-
BREAKING Updated the
postgres
package to version3.0.0
(by @BreX900).To visit all the breaking changes see their changelog.
- You no longer need to use the
Database
class, you can useConnection.open
orPool
directly. Database
class now implementsSession
andSessionExecutor
classes frompostgres
package.- Removed
Database.query
method in favour ofSession.execute
method. - Extension methods for accessing repositories now extend
Session
. Action
andQuery
now accept aSession
- You no longer need to use the
-
BREAKING Generated repository methods are no longer wrapped in a transaction.
Instead, wrap your database calls in a transaction yourself, e.g. by using
db.runTx()
. -
Added the ability to create a Pool for your database-
-
Updated analyzer dependency to
^6.0.0
. -
Updated dart sdk constraints to
>=3.0.0 <4.0.0
.
- Fixed bug with boolean column in migration.
-
Added
Table.defaultView
flag for referring to the default view of a table. -
[BREAKING] Removed model mixin from default view classes.
- If needed this can now be specified manually using
ModelMeta
annotations.
- If needed this can now be specified manually using
-
Fixed bug with using
@HiddenIn
on normal fields. -
Corrected naming of bool sql type to
boolean
. -
Fixed type cast for parameters in update queries.
-
Moved documentation to dartdoc topics.
-
Increased test coverage.
- Support generic type converters.
- Support self-joins. Models can now have relations to itself.
- Added
value
property toQueryParams
to supply custom query parameters. - Added
@BindTo()
annotation to resolve ambiguous field relations.
- Fixed wrong column types in update query.
- Improved handling of auto-increment ids.
- Added
ModelMeta
annotation to customize generated entity classes.
- [BREAKING] Switched to generating
part
files for each model.- Migrate by adding
part <myfile>.schema.dart
on top of each model file.
- Migrate by adding
- [BREAKING] Changed how Views are defined.
- The
@Model()
annotation now only defines the names of existing views asSymbol
s:@Model(views: [#Full, #Reduced, #Other])
. - Field modifications are done by annotating the specific field with either
@HiddenIn(#MyView)
,@ViewedIn(#MyView, as: #OtherView)
and@TransformedIn(#MyView, by: MyTransformer())
.
- The
- The CLI supports setting connection values via command args or prompts missing values.
- Views are now virtual (queries) and not written to the database. This enables more flexibility for queries and fixes some migration issues.
- All query inputs are now properly parameterized to prevent sql injections.
- [BREAKING] The
on conflict
clause for inserts is removed. Inserts now fail when a given key already exists. - Added proper testing.
- Fixed bug with email encoding.
- Fixed bug with one-to-many relations.
- Added
DB_SOCKET
environment connection variable.
- Added support for enum serialization in models (by @TimWhiting)
- Api and documentation fixes
- Added support for serialization through custom annotations
- Improved migration cli and added support for manual migration output to .sql files
- Fixed bug with default views and value decoding
- Added
@AutoIncrement()
annotation for auto incrementing values - Added support for multiple schemas when using the migration tool
- Fixed escaping of strings
- Fix data encoding
- Move QueryParams to public library
- Allow models to inherit fields from other classes
- Fix deep insert bug
- Update dependencies
- Cleanup lints
- Internal rewrite (again)
- Added documentation to README
- Rewrote view system
- Internal refactoring
- Update dependencies
- Fix encoding bug
- Update tool: Read json schema location from build.yaml
- Added delete actions
- Refactor and cleanup, first published version
- Added first README draft
- Use joins only for many-to-many
- Fix some generation bugs
- Initial development release