ormed 0.4.0-dev+11 copy "ormed: ^0.4.0-dev+11" to clipboard
ormed: ^0.4.0-dev+11 copied to clipboard

Strongly typed ORM core primitives (annotations, metadata, codecs, and generator) for the routed ecosystem.

Changelog #

0.4.0-dev+11 #

  • Added: Host-neutral atomic query-builder batches with native-driver execution, transactional fallback, ordered results, and per-statement metadata.
  • Added: Repository batch staging plus generated identity results for atomic inserts and upserts.
  • Fixed: updateBatch() now executes atomically and rejects rows missing their configured unique key instead of broadening the update predicate.
  • Fixed: Failed native atomic batches are now recorded in query logs and connection events for every staged operation.
  • Fixed: Native batch interceptors now receive each staged operation's query or mutation plan for policy enforcement.
  • Fixed: Projected hard-delete batches retain the primary key required by query-delete compilers, and ID fallbacks reject auto-increment sentinels.

0.3.1 #

  • Fixed: Codegen-free map inserts now keep inferred mutation columns separate from ad-hoc read and returning projections, preserving generated columns and later SELECT * queries.
  • Fixed: Generated query helpers suppress the intentional unbounded-query analyzer warning using the namespaced plugin diagnostic.
  • Fixed: Query safety analysis now handles generated sources without reporting the companion all helper.

0.3.0 #

  • Added: OrmDatabase for direct, codegen-optional connections, raw SQL, schema plans, migrations, seeding, transactions, and lifecycle management.
  • Added: Ordered QueryInterceptor middleware for query-builder queries, mutations, raw SQL, schema plans, migrations, streams, and transactions.
  • Added: Built-in OrmOpenTelemetryInterceptor backed by dartastic_opentelemetry, with SQL text excluded by default.
  • Added: Reactive Query.watch() / watchRows() snapshots with table-aware invalidation and an opt-in driver change-feed contract.
  • Added: Reactive changes are held across managed and manually controlled transactions until commit, with direct invalidation helpers for integrations.
  • Added: Optional DriverLifecycle support lets external executor adapters open their backend during DataSource initialization.
  • Breaking: Requires Dart 3.12 or newer.
  • Breaking: Migrated the analyzer integration to Analyzer 14, including the new argument and formal-parameter AST APIs.
  • Updated: Refreshed build, source generation, testing, and analyzer tooling dependencies to their latest Dart 3.12-compatible releases.
  • Updated: Internal driver and test-package constraints now support the full 0.x release range.

0.2.0 #

  • Added: OrmedEnvironment with .env loading, variable interpolation support (${VAR} / ${VAR:-default}), and typed helpers for required values.
  • Added: MigrationEntry.named(...) helper for easier manual migration registration.
  • Improved: DataSource.fromConfig now falls back to an empty ModelRegistry when not explicitly provided.
  • Changed: Default ORM registry generation output path moved to lib/src/database/orm_registry.g.dart.
  • Fixed: Registry generator now emits package imports when needed so generated files continue to compile from nested output paths.
  • Docs: Updated quickstart and migration helper guidance to use make:migration and document makemigrations as model-diff generation plus registry sync.
  • Docs: Clarified migrations:sync as the registry-only command and aligned command examples with the current ormed_cli executable usage.

0.1.0 #

  • Release: Promote Ormed to a stable 0.1.0 release.
  • Improved: Align analyzer tooling with analyzer 10 (analysis_server_plugin/analyzer_plugin/analyzer_testing).

0.1.0-dev+10 #

  • Added: Query cache invalidation policy flushOnWrite to clear cached results after mutations, plus warning hooks for risky query features like fallback row identifiers.
  • Added: disableAutoHydration to opt out of automatic hydration when building queries.
  • Improved: raw_sql_interpolation analyzer lint is now configurable (or disable-able) via analysis_options.yaml.
  • Fixed: Non-nullable enum defaults now parse CAST() expressions correctly, and generated tracked models no longer duplicate relation getters.
  • Fixed: SQL preview now surfaces unsupported query features instead of masking errors.

0.1.0-dev+9 #

  • Added: test helpers now generated via ormed init include dual SQLite datasources, primaryTestConfig/analyticsTestConfig, and connection helpers so user tests can rely on shared migrations without managing the multi-datasource wiring manually.
  • Added: bootstrap test harness writes and runs a helper-driven test while the CLI template now offers --only=tests and a reusable helper to prove connection isolation in generated apps.
  • Improved: setUpOrmed runs migrations for the provided DataSource by default, adds deterministic parallel groupIds, and optionally provisions a Postgres schema per config key so shared manager reuse stays conflict-free.
  • Improved: TestDatabaseManager accepts an optional baseSchema, ensures it is created/selected before migrations, and tracks it for cleanup.
  • Switched: internal hashing helpers now use hashlib instead of crypto.
  • Refactor: Decoupled core package from driver-specific dependencies (ormed_sqlite, ormed_mysql, ormed_postgres).
  • Added: MockDriver and InMemoryQueryExecutor for isolated grammar and primitive validation without driver dependencies.
  • Improved: Schema migration runner now ensures boarder compatibility by avoiding implicit transactions for DDL (standardized across all drivers).
  • Fixed: PostgreSQL JSON encoding now recursively handles AdHocRow, ModelAttributes, and DTOs within nested Maps and Iterables.

0.1.0-dev+8 #

  • Added: Structured OrmException/DriverException for richer runtime and CLI messaging.
  • Added: dart run ormed now prints guidance for running the CLI package.
  • Added: External model factory definitions with named states and registry-based overrides.
  • Fixed: Generated tracked model constructors now mirror user constructor shapes.

0.1.0-dev+7 #

  • Added: Transaction outcome hooks/events that distinguish commit vs rollback (with savepoint scope details).
  • Added: Transaction boundary logging in query logs (BEGIN/COMMIT/ROLLBACK and savepoints).
  • Added: Analyzer plugin is now included in ormed (no separate ormed_analyzer package).
  • Added: Analyzer diagnostics for select/order/group/having validation, nested relation checks, relation callback field mismatch, missing pivot fields, type-aware predicates, query safety (limit/order + unbounded get/all), raw SQL alias checks, DTO validation, and soft-delete/timestamp misuse; supports split-chain tracking.
  • Fixed: copyWith now casts non-nullable Object fields to avoid analyzer errors.

0.1.0-dev+6 #

  • Added: Typed predicate field accessors for where callbacks (e.g. q.title.eq(...)) and typed relation helpers (withPosts, whereHasPosts).
  • Added: Generated copyWith extensions for user-defined models with sentinel-based null handling, including constructor-backed relation fields.
  • Added: Generated toMap/fromMap helpers for user and tracked models using column-name maps.
  • Added: Driver extension registry and query builder hooks (selectExtension, whereExtension, orderByExtension, groupByExtension, havingExtension, join constraints).
  • Added: Full-text query compilation for whereFullText across Postgres, MySQL/MariaDB, and SQLite, including optional index targeting.
  • Docs: Added driver extension tutorial and examples.
  • Added: DataSource logging can now use an injected contextual logger and exposes it for inspection.

0.1.0-dev+5 #

  • Fixed: Treat driver SQL NULL wrapper values as null when applying timestamp defaults.
  • Improved: Generated codecs now omit virtual attributes (timestamps/soft deletes) unless explicitly set.
  • Added: Core tests for SQL NULL handling helpers.
  • Fixed: JSON casts now accept raw strings and mixed JSON values for Object? fields.
  • Fixed: JSON cast decoding now handles byte payloads from MySQL/MariaDB drivers.
  • Fixed: Map/DTO insert & upsert inputs now apply field codecs (casts) consistently.
  • Changed: Automatic timestamps now use plain UTC time without monotonic state.

0.1.0-dev+4 #

  • Added: Relationship touching with touches, touch(), and touchOwners() for keeping related updated_at values in sync.
  • Added: withoutTouchingOn / withoutTimestampsOn scopes to suppress automatic touching or timestamp updates.
  • Added: @OrmModel(timestamps: false) to disable automatic timestamp updates while still using timestamp fields.
  • Improved: Timestamp casting accepts numeric epoch inputs (seconds) in addition to DateTime/Carbon types.
  • Added: Through relations support with hasOneThrough and hasManyThrough relation types.
  • Added: Polymorphic relations with morphTo, morphToMany, and morphedByMany support.
  • Added: Attribute accessors and mutators for get/set interception.
  • Added: Appended/computed attributes for serialization.
  • Added: Extended attribute casting system with custom cast handlers.
  • Added: Pivot enhancements including withPivot field selection and pivot timestamps.
  • Added: Raw query helpers orderByRaw and groupByRaw.
  • Fixed: updatedAt now respects explicitly provided values during updates (dirty-check aware).
  • Added: Object input support for fill, forceFill, and fillIfAbsent methods.
  • Refactored: Decoupled database drivers from the core package. Drivers now register themselves via DriverAdapterRegistry.
  • Added: DataSource.fromConfig as the standard, driver-agnostic entry point for ORM initialization.
  • Added: syncWithoutDetaching, syncWithPivotValues, toggle, and updateExistingPivot methods for ManyToMany relationships.
  • Added: Support for eager loading nested relations (e.g., ds.query<User>().with('posts.comments').get()).
  • Added: copyWith method generation for DTOs and partial models.
  • Added: suppressEvents option to Query for optimized bulk operations.
  • Added: loadOrmConfig() and findOrmConfigFile() convenience helpers for configuration management.
  • Fixed: Eager loading for models with custom primary keys (Issue #12).
  • Fixed: Improved relation inference for complex naming conventions and ambiguous foreign keys (Issue #7).
  • Fixed: Missing relation accessors in generated models for certain edge cases (Issue #6).
  • Fixed: Resolved bugs #4, #11, and #13 related to query builder edge cases.
  • Improved: Code generator now emits dartdoc comments for all generated models and members.
  • Improved: Reached 160/160 pub score with expanded documentation and examples.

0.1.0-dev+3 #

  • Fixed: Timestamp getters (createdAt, updatedAt, deletedAt) now return immutable Carbon instances to prevent accidental mutation of model state when chaining date methods like subDay().
  • Refactored Timestamps and SoftDeletes mixins to use CarbonInterface for getters and Object? for setters.
  • Exported carbonized package directly from ormed.dart.
  • Improved DateTimeCodec to handle Carbon instances during decoding.
  • Fixed mass assignment to handle both field and column names for excluded attributes.
  • Optimized Postgres test performance using transactional isolation.
  • Fixed SQLite test cleanup issue where test_g* files were left behind.
  • Expanded testing documentation with isolation strategies and concurrency guides.
  • Updated doc comments to follow Effective Dart guidelines.

0.1.0-dev+2 #

  • Synchronized release with ormed_cli rebranding.

0.1.0-dev+1 #

  • Added automatic snake_case column name inference for model fields.
  • Fixed DatabaseSeeder.seed<T>() to use repositories for correct data encoding.
  • Fixed bootstrapOrm() to ensure model registration in existing registries.
  • Improved documentation for naming conventions and CLI-first workflow.

0.1.0-dev #

  • Initial release.
7
likes
0
points
1.13k
downloads

Documentation

Documentation

Publisher

verified publisherglenfordwilliams.com

Weekly Downloads

Strongly typed ORM core primitives (annotations, metadata, codecs, and generator) for the routed ecosystem.

Repository (GitHub)
View/report issues

Topics

#orm #database #sql

Funding

Consider supporting this project:

www.buymeacoffee.com

License

unknown (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, build, carbonized, collection, contextual, dartastic_opentelemetry, decimal, dotenv, glob, hashlib, inflector_dart, meta, path, source_gen, test, yaml

More

Packages that depend on ormed