PackageTrack
Sign in Get early access

bavard

An Eloquent-inspired ORM for Flutter. Supports SQLite, PostgreSQL and PowerSync with fluent queries, relationships, soft deletes, timestamps, casts and more.

0.0.28 ILDaviz/bavard

What this package is like to depend on

Last release 6 months ago

12 Feb 2026

Ships fairly regularly

a new release about every 4 weeks

Nearly every release is documented

notes for 20 of 20 stable releases

Nothing withdrawn

no release was ever pulled

8 months old

20 releases · first in 2025

20 releases in the last 12 months

see the full history below

Release timeline

20 releases · Dec 2025 to Feb 2026
2026
Release Pre-release

Releases

latest 20
  1. 0.0.28 12 Feb 2026
    Release notes

    Added

    • Schema: Added support for table alterations (Schema.table(...)) and column modifications via the new Blueprint and Grammar updates.
    • Schema: Added change() method to ColumnDefinition for modifying existing columns.
    • Grammar: Enhanced SQLiteGrammar and PostgresGrammar to generate DDL for schema changes (ADD COLUMN, ALTER COLUMN, DROP COLUMN).
    • Migrations: Exposed necessary internals to support the bavard_migration package.
    • CLI: Introduced dart run bavard CLI tool for scaffolding models and pivots without code generation.
      • make:model: Generates a Model class with schema, accessors, and casts.
      • make:pivot: Generates a Pivot class with accessors and columns list.
    Open source →
  2. 0.0.27 07 Jan 2026
    Release notes

    Added

    • Core: Added stackTrace support to BavardException and all its subclasses. This ensures that when database errors or transaction failures are caught and rethrown, the original stack trace is preserved for easier debugging.
    • Core: Added formatBoolForDebug() to Grammar to support dialect-specific boolean formatting (e.g., TRUE/FALSE for Postgres vs 1/0 for SQLite) in debug SQL output.
    • Testing: Updated MockDatabaseSpy constructor to accept an optional Grammar, enabling better testing of dialect-specific behaviors in unit tests.

    Changed

    • Generator: Migrated to SharedPartBuilder for code generation.
    • Pivots: Standardized the Pivot constructor pattern to UserRole([Map<String, dynamic> attributes = const {}]) : super(Map.from(attributes)). This ensures better isolation of pivot data and supports parameterless instantiation.

    Documentation

    • Theme: Applied glassmorphism style to the navigation bar for better readability.
    • Fun: Added a surprise "quack" on the homepage for curious clickers. 🪿
    • Reference: Updated "Error Handling" guide to document the new stackTrace property and how to use it for debugging.

    Fixed

    • Core: Improved SQL generation for HasSoftDeletes and relationships (BelongsTo, HasMany, etc.) by fully qualifying column names with their table aliases (e.g. users.deleted_at instead of deleted_at). This prevents "ambiguous column name" errors in complex queries involving joins.
    • Core: Fixed QueryBuilder.toSql() and toRawSql() to correctly apply global scopes (like soft deletes) before compiling the SQL.
    • Core: Fixed a bug in QueryBuilder.toRawSql() where placeholder replacement (?) was incorrectly applied to points of domanda inside string literals. It now uses a safer parser that respects string boundaries.
    Open source →
  3. 0.0.26 05 Jan 2026
    Release notes

    Added

    • Core: Added insertAll() method to QueryBuilder for high-performance bulk record insertion. It generates a single SQL query (VALUES (...), (...)) and bypasses model events for efficiency.
    • Core: Added cursor({int batchSize}) method to QueryBuilder for lazy streaming of large datasets using offset-based pagination. This allows iterating over thousands of records without loading them all into memory at once.
    • Core: Added support for SQL Set Operations: union(), unionAll(), intersect(), and except(). These methods allow combining results from multiple queries with automatic binding aggregation and proper SQL generation.
    • Relations: Added support for Conditional Eager Loading. withRelations now accepts a Map<String, ScopeCallback> where the value is a callback to apply constraints (e.g. where) to the eager loading query.
    Open source →
  4. 0.0.25 31 Dec 2025
    Release notes

    Documentation

    • Reference: Updated "Database Adapters" guide to reflect the new simplified DatabaseAdapter interface and explained that watch logic is now handled by the core.
    • Readme: Enhanced the project README with a comprehensive "Quick Start" guide, database initialization steps, and a dedicated "Relationships" section.
    Open source →
  5. 0.0.24 31 Dec 2025
    Release notes

    Refactor

    • Core: Implemented database-agnostic watch() functionality. The logic for tracking table changes and notifying listeners has been moved from individual adapters to the central DatabaseManager.
    • Core: DatabaseManager now handles notification buffering during transactions. Table changes are only emitted to watch streams after a transaction is successfully committed, preventing dirty reads.
    • Adapters: Simplified DatabaseAdapter interface by removing watch-specific methods, making it easier to implement new database drivers.

    Added

    • Testing: Added comprehensive tests for watch behavior within transactions (commit/rollback scenarios) in transaction_test.dart and watch_test.dart.
    Open source →
  6. 0.0.23 27 Dec 2025
    Release notes

    Added

    • Core: Support for Custom Attribute Casts via the AttributeCast<T, R> interface.
    • Core: Added smart Dirty Checking for Timestamps. updated_at is now only updated if the model has other dirty attributes, preventing redundant queries.
    • Schema: Standard columns (IdColumn, CreatedAtColumn, etc.) now have default names, enabling zero-config automatic casting.
    • Testing: New Shared Integration Test Suite in example/shared_test_suite.
    • Testing: Added 5 new integration scenarios: Concurrency, Blob support, Unique constraints, UTC Date handling, and Dirty Checking optimization.
    • Tooling: Added make test-all to the Makefile for a full one-shot test execution (Unit + SQLite + Postgres).

    Improved

    • Adapters: Enhanced PostgresAdapter to handle binary data (Blobs) using TypedValue and fixed SQL placeholder interpolation.
    • Core: Refactored HasTimestamps to use the internal casting system instead of raw attribute access.
    Open source →
  7. 0.0.22 27 Dec 2025
    Release notes

    Added

    • Core: Refactored HasCasts to automatically derive casting rules from the columns list (Schema), eliminating the need for a manual casts map in most cases.
    • Documentation: Updated "Type Casting" and "Model" guides to prioritize schema-driven casting and added examples for manual implementations.

    Improved

    • Core: Enhanced internal type mapping between SQL schema types (integer, boolean, doubleType) and Dart runtime types (int, bool, double).
    Open source →
  8. 0.0.21 27 Dec 2025
    Release notes

    Added

    • Core: Added distinct() method to QueryBuilder to support SELECT DISTINCT queries.

    Fixed

    • Core: Fixed HasSoftDeletes mixin to correctly handle deletedAt type compatibility (getter DateTime?, setter DateTime?) and corrected internal key typo (delete_at -> deleted_at).
    Open source →
  9. 0.0.20 26 Dec 2025
    Release notes

    Fixed

    • Core: Fixed type created_at, updated_at
    Open source →
  10. 0.0.19 26 Dec 2025
    Release notes

    Fixed

    • Core: Fixed type created_at, updated_at and cancel_at
    Open source →
  11. 0.0.18 26 Dec 2025
    Release notes

    Added

    • Schema: Added IdColumn, CreatedAtColumn, UpdatedAtColumn, and DeletedAtColumn to enable fully type-safe queries on standard fields.
    • Mixins: Added typed getters/setters (createdAt, updatedAt, deletedAt) directly to HasTimestamps and HasSoftDeletes mixins.
    • QueryBuilder: Implemented dynamic column name resolution. Standard columns in the schema (e.g. User.schema.id) now automatically resolve to the model's actual configuration (e.g. primaryKey) at runtime.

    Improved

    • Generator: The @fillable generator now intelligently ignores standard columns if the corresponding mixins are present, preventing code duplication and conflicts.
    • Schema: Refactored Column hierarchy to support polymorphic column lists via SchemaColumn interface, fixing type variance issues in many-to-many pivots.
    • Documentation: Updated code generation guide to showcase the new concise schema definition style and explained standard column behavior.

    Documentation

    • Core: Clarified that code generation is completely optional; Bavard is designed to work entirely at runtime using standard Dart syntax.
    • Guides: Added comprehensive instructions for manual model and pivot class implementation (without build_runner).
    • Home: Updated features list to highlight "Zero boilerplate", "Offline-first", and "Smart Data Casting".
    • API Reference: Reorganized documentation to distinguish between core (included) and optional mixins.
    Open source →
  12. 0.0.17 24 Dec 2025
    Release notes

    Added

    • Relations: Added attach() and detach() methods to BelongsToMany for easy management of many-to-many relationships.
    • Examples: Added a comprehensive PostgreSQL + Docker integration test suite in example/postgresql-docker.
    • Core: Allow Column objects as keys in insert and update methods.
    • Tests: Added dedicated unit tests for BelongsToMany attach/detach operations.

    Improved

    • Core: Enhanced QueryBuilder.avg() to robustly handle numeric string results, improving compatibility with PostgreSQL numeric types.
    • Examples: Refactored sqlite-docker and postgresql-docker examples to eliminate raw SQL queries in favor of ORM-native methods.

    Fixed

    • Core: Quote table and column names in SQL queries to prevent syntax errors.

    Changed

    • Dependencies: Update project dependencies.
    • Tests: Update mocks for database grammar wrap.
    Open source →
  13. 0.0.16 24 Dec 2025
    Release notes

    Changed

    • Dependencies: Update dependencies
    Open source →
  14. 0.0.14 24 Dec 2025
    Release notes

    Changed

    • Dependencies: Update dependencies
    Open source →
  15. 0.0.13 24 Dec 2025
    Release notes

    Changed

    • Dependencies: Update dependencies
    Open source →
  16. 0.0.12 24 Dec 2025
    Release notes

    Changed

    • Dependencies: Update dependencies
    Open source →
  17. 0.0.11 24 Dec 2025
    Release notes

    Changed

    • Dependencies: Update dependencies
    Open source →
  18. 0.0.10 24 Dec 2025
    Release notes

    Added

    • Core: Enhanced QueryBuilder with comprehensive support for Column objects across all methods (select, where, groupBy, orderBy, count, sum, etc.), enabling fully type-safe queries.
    • Core: Added automatic table prefixing (e.g., "users"."id") when using Column objects to prevent column ambiguity during joins.
    • Core: Added whereColumn and orWhereColumn methods for comparing two columns.
    • Core: Added whereBetween, orWhereBetween, whereNotBetween, and orWhereNotBetween methods.
    • Relations: Added support for Column objects in BelongsToMany pivot filters (wherePivot, withPivot, etc.) with automatic pivot table prefixing.
    • Security: Added strict validation and helpful error messages when passing invalid arguments (like WhereCondition) to QueryBuilder methods.

    Fixed

    • Documentation: Fixed 404 error on API index page and improved navigation.
    • Core: Fixed identifier quoting in aggregate functions for better dialect compatibility.
    Open source →
  19. 0.0.9 24 Dec 2025
    Release notes

    Changed

    • Documentation: Update doc.
    Open source →
  20. 0.0.8 24 Dec 2025
    Release notes

    Changed

    • Documentation: Update doc.
    • Examples: Change locations.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive