Updated orm generator

This commit is contained in:
thomashii 2021-07-25 18:35:05 +08:00
parent 9c4df63b8f
commit e81b44af8e
6 changed files with 17 additions and 13 deletions

View file

@ -1,5 +1,10 @@
# Change Log
## 4.0.0-beta.4
* Fixed `build.yaml`
* Updated generated code to use `angel3` packages
## 4.0.0-beta.3
* Updated README

View file

@ -6,8 +6,7 @@
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/orm/angel3_orm_generator/LICENSE)
Source code generators for Angel's ORM.
This package can generate:
Source code generators for Angel3 ORM. This package can generate:
* A strongly-typed ORM
* SQL migration scripts

View file

@ -1,6 +1,6 @@
builders:
angel_orm:
import: "package:angel_orm_generator/angel_orm_generator.dart"
angel3_orm:
import: "package:angel3_orm_generator/angel3_orm_generator.dart"
builder_factories:
- migrationBuilder
- ormBuilder
@ -8,12 +8,12 @@ builders:
build_to: cache
build_extensions:
.dart:
- ".angel_migration.g.part"
- ".angel_orm.g.part"
- ".angel3_migration.g.part"
- ".angel3_orm.g.part"
required_inputs:
- angel_serialize.g.part
- angel_serialize_serializer.g.part
- angel3_serialize.g.part
- angel3_serialize_serializer.g.part
applies_builders:
- angel_serialize_generator|angel_serialize
- angel3_serialize_generator|angel3_serialize
- source_gen|combining_builder
- source_gen|part_cleanup"

View file

@ -14,7 +14,7 @@ Builder migrationBuilder(BuilderOptions options) {
return SharedPartBuilder([
MigrationGenerator(
autoSnakeCaseNames: options.config['auto_snake_case_names'] != false)
], 'angel_migration');
], 'angel3_migration');
}
class MigrationGenerator extends GeneratorForAnnotation<Orm> {

View file

@ -20,7 +20,7 @@ Builder ormBuilder(BuilderOptions options) {
return SharedPartBuilder([
OrmGenerator(
autoSnakeCaseNames: options.config['auto_snake_case_names'] != false)
], 'angel_orm');
], 'angel3_orm');
}
TypeReference futureOf(String type) {

View file

@ -1,5 +1,5 @@
name: angel3_orm_generator
version: 4.0.0-beta.3
version: 4.0.0-beta.4
description: Code generators for Angel3 ORM. Generates query builder classes.
homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/orm/angel_orm_generator
@ -29,4 +29,4 @@ dev_dependencies:
pedantic: ^1.11.0
postgres: ^2.3.2
test: ^1.17.3
optional: ^6.0.0-nullsafety.2
optional: ^6.0.0