Bavard
Reactive, Eloquent-inspired ORM for Dart & Flutter designed for PowerSync, SQLite or whatever you want.
Install / Use
/learn @ILDaviz/BavardREADME
Bavard ORM 🗣️
The Eloquent-style ORM for Dart.
Work in Progress: This project is currently under active development. APIs may change.
Bavard brings the elegance and simplicity of Eloquent to the Dart ecosystem. It is designed to provide a fluent, expressive interface for database interactions, prioritizing developer experience, runtime flexibility, and readability.
Structure
- packages/bavard: The Dart package source code.
- packages/bavard_cli: The Dart package cli tool.
- packages/bavard_migration: The Dart package migration tool.
- packages/documentation: The documentation website (VitePress).
- packages/bavard_example_project: demonstrative Flutter project that illustrates how to integrate and use Bavard ORM
Documentation
For detailed guides, API references, and usage examples, please visit our documentation:
Key Features
- 💙 Flutter ready: Seamlessly integrated with Flutter for mobile, desktop, and web applications.
- ⚡️ Runtime-first architecture: Code generation is 100% optional. Bavard leverages Dart's runtime capabilities and mixins to work entirely without build processes.
- 🏗️ Fluent Query Builder: Construct complex SQL queries using an expressive and type-safe interface.
- 🔗 Rich Relationship Mapping: Full support for One-to-One, One-to-Many, Many-to-Many, Polymorphic, and HasManyThrough relations.
- 🧩 Smart Data Casting: Automatic hydration and dehydration of complex types like JSON, DateTime, and Booleans between Dart and your database.
- 🏭 Production-ready features: Built-in support for Soft Deletes, Automatic Timestamps, and Global Scopes out of the box.
- 📱 Offline-first ready: Native support for client-side UUIDs and a driver-agnostic architecture, ideal for local-first applications.
- 🕵️ Dirty Checking: Optimized database updates by tracking only the attributes that have actually changed.
- 🚀 Eager Loading: Powerful eager loading system to eliminate N+1 query problems.
- 🌐 Database Agnostic: Flexible adapter system with native support for SQLite and PostgreSQL.
Running Tests
To run tests for the all Bavard package:
make test
Related Skills
feishu-drive
339.5k|
things-mac
339.5kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
339.5kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
yu-ai-agent
2.0k编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一网打尽,帮你成为 AI 时代企业的香饽饽,给你的简历和求职大幅增加竞争力。
