Published ORM
This commit is contained in:
parent
df52801c66
commit
7245a45fbe
9 changed files with 29 additions and 18 deletions
|
@ -1,5 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 4.0.5
|
||||||
|
|
||||||
|
* Added `where.raw()`
|
||||||
|
|
||||||
## 4.0.4
|
## 4.0.4
|
||||||
|
|
||||||
* Changed default varchar size to 255
|
* Changed default varchar size to 255
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel3_orm
|
name: angel3_orm
|
||||||
version: 4.0.4
|
version: 4.0.5
|
||||||
description: Runtime support for Angel3 ORM. Includes base classes for queries.
|
description: Runtime support for Angel3 ORM. Includes base classes for queries.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm
|
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 4.3.0
|
||||||
|
|
||||||
|
* Added `where.raw()`
|
||||||
|
|
||||||
## 4.2.0
|
## 4.2.0
|
||||||
|
|
||||||
* Added `select(List fields)`
|
* Added `select(List fields)`
|
||||||
|
|
|
@ -91,21 +91,15 @@ class EmployeeQuery extends Query<Employee, EmployeeQueryWhere> {
|
||||||
if (row.every((x) => x == null)) {
|
if (row.every((x) => x == null)) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
var _index = 0;
|
|
||||||
var model = Employee(
|
var model = Employee(
|
||||||
id: fields.contains('id') ? row[_index++].toString() : null,
|
id: fields.contains('id') ? row[0].toString() : null,
|
||||||
createdAt:
|
createdAt: fields.contains('created_at') ? (row[1] as DateTime?) : null,
|
||||||
fields.contains('created_at') ? (row[_index++] as DateTime?) : null,
|
updatedAt: fields.contains('updated_at') ? (row[2] as DateTime?) : null,
|
||||||
updatedAt:
|
uniqueId: fields.contains('unique_id') ? (row[3] as String?) : null,
|
||||||
fields.contains('updated_at') ? (row[_index++] as DateTime?) : null,
|
firstName: fields.contains('first_name') ? (row[4] as String?) : null,
|
||||||
uniqueId:
|
lastName: fields.contains('last_name') ? (row[5] as String?) : null,
|
||||||
fields.contains('unique_id') ? (row[_index++] as String?) : null,
|
|
||||||
firstName:
|
|
||||||
fields.contains('first_name') ? (row[_index++] as String?) : null,
|
|
||||||
lastName:
|
|
||||||
fields.contains('last_name') ? (row[_index++] as String?) : null,
|
|
||||||
salary: fields.contains('salary')
|
salary: fields.contains('salary')
|
||||||
? double.tryParse(row[_index++].toString())
|
? double.tryParse(row[6].toString())
|
||||||
: null);
|
: null);
|
||||||
return Optional.of(model);
|
return Optional.of(model);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel3_orm_generator
|
name: angel3_orm_generator
|
||||||
version: 4.2.0
|
version: 4.3.0
|
||||||
description: Code generators for Angel3 ORM. Generates query builder classes.
|
description: Code generators for Angel3 ORM. Generates query builder classes.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_generator
|
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_generator
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 3.3.0
|
||||||
|
|
||||||
|
* Updated test cases
|
||||||
|
* Fixed test cases failing on terminaless `stdout`
|
||||||
|
|
||||||
## 3.2.1
|
## 3.2.1
|
||||||
|
|
||||||
* Fixed null safety errors
|
* Fixed null safety errors
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel3_orm_postgres
|
name: angel3_orm_postgres
|
||||||
version: 3.2.1
|
version: 3.3.0
|
||||||
description: PostgreSQL support for Angel3 ORM. Includes functionality for querying and transactions.
|
description: PostgreSQL support for Angel3 ORM. Includes functionality for querying and transactions.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_postgres
|
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_postgres
|
||||||
|
@ -13,7 +13,7 @@ dependencies:
|
||||||
postgres_pool: ^2.1.3
|
postgres_pool: ^2.1.3
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
belatuk_pretty_logging: ^4.0.0
|
belatuk_pretty_logging: ^4.0.0
|
||||||
angel3_orm_test: ^3.0.0
|
angel3_orm_test: ^3.1.0
|
||||||
test: ^1.17.5
|
test: ^1.17.5
|
||||||
lints: ^1.0.0
|
lints: ^1.0.0
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 3.1.0
|
||||||
|
|
||||||
|
* Added `join_test` test cases
|
||||||
|
|
||||||
## 3.0.5
|
## 3.0.5
|
||||||
|
|
||||||
* Updated test cases
|
* Updated test cases
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel3_orm_test
|
name: angel3_orm_test
|
||||||
version: 3.0.5
|
version: 3.1.0
|
||||||
description: Common tests for Angel3 ORM. Reference implmentation of the generated ORM files.
|
description: Common tests for Angel3 ORM. Reference implmentation of the generated ORM files.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_test
|
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_test
|
||||||
|
|
Loading…
Reference in a new issue