phorm_generator 1.2.0
phorm_generator: ^1.2.0 copied to clipboard
Code generator for PHORM that turns @Schema-annotated Dart models into SQL table schemas, migrations, JSON mappers and runtime metadata for SQLite, PostgreSQL and MySQL.
Changelog #
1.2.0 #
- Added support for the new
@Schema(generateFullService: ...)option. When set tofalse, the generator no longer emits the large pluralized static service class (e.g.Users); only the lightweight schema, table, mappers andcopyWithare generated. Defaults totrue, so existing output is unchanged. - Bumped
phorm_annotationsdependency to^1.2.0, which also carries theMigrationBuilder.build()fix (previously droppedcolumns,timestamps, andautoIncrementwhen rebuilding a table via the fluent migration API).
1.1.0 #
- Added per-dialect schema generation driven by
@Schema(dialect: ...). DDL rules are now split into per-dialect strategies undersrc/generators/<dialect>/(sqlite,postgres,mysql); the entry pointPhormSchemaGeneratordispatches by dialect. SQLite output is unchanged; Postgres/MySQL are scaffolds. - Split custom SQL function generation by dialect (
<dialect>_function_generator);SqlFunctionGeneratoris renamed toPhormFunctionGeneratorand delegates to aFunctionGeneratorstrategy (defaults to SQLite). - Requires
phorm_annotations: ^1.1.0(forSqlDialectKind).
1.0.3 #
- Lowered
analyzerconstraint to>=6.4.1 <6.9.0for compatibility with Dart 3.7 SDKs (avoids the unavailable_macrospackage). - Updated element accessors to the matching analyzer API (
enclosingElement,getDisplayString(withNullability: true)).
1.0.2 #
- Updated SDK environment constraint to >=3.7.0 <4.0.0
- Restored analyzer dependency to ^6.11.0 to resolve build errors
1.0.1 #
- Updated README with badges
- Removed commented workspace resolution configuration
1.0.0 #
- First stable release.
- Automatically generates optimized SQL schemas (tables, indices, foreign keys) and DDL from annotations.
- Produces type-safe relational model mixins (
_$PhormModelMixin) and pluralized service accessors. - Provides highly optimized
_$PhormModelFromJsonmethods for fast JSON mapping. - Integrates with
build_runnerandsource_genfor hot-reloadable, automated code generation.
