Updated orm postgres
This commit is contained in:
parent
3eeefa7916
commit
b670a08ae3
2 changed files with 6 additions and 10 deletions
|
@ -14,9 +14,5 @@ dev_dependencies:
|
||||||
angel3_pretty_logging: ^3.0.0
|
angel3_pretty_logging: ^3.0.0
|
||||||
test: ^1.17.0
|
test: ^1.17.0
|
||||||
pedantic: ^1.11.0
|
pedantic: ^1.11.0
|
||||||
angel3_orm_test:
|
angel3_orm_test: ^3.0.0
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: angel3
|
|
||||||
path: packages/orm/angel_orm_test
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'models/custom_expr.dart';
|
||||||
void customExprTests(FutureOr<QueryExecutor> Function() createExecutor,
|
void customExprTests(FutureOr<QueryExecutor> Function() createExecutor,
|
||||||
{FutureOr<void> Function(QueryExecutor)? close}) {
|
{FutureOr<void> Function(QueryExecutor)? close}) {
|
||||||
late QueryExecutor executor;
|
late QueryExecutor executor;
|
||||||
Numbers? numbersModel;
|
late Numbers numbersModel;
|
||||||
|
|
||||||
close ??= (_) => null;
|
close ??= (_) => null;
|
||||||
|
|
||||||
|
@ -27,16 +27,16 @@ void customExprTests(FutureOr<QueryExecutor> Function() createExecutor,
|
||||||
tearDown(() => close!(executor));
|
tearDown(() => close!(executor));
|
||||||
|
|
||||||
test('fetches correct result', () async {
|
test('fetches correct result', () async {
|
||||||
expect(numbersModel?.two, 2);
|
expect(numbersModel.two, 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('in relation', () async {
|
test('in relation', () async {
|
||||||
var abcQuery = AlphabetQuery();
|
var abcQuery = AlphabetQuery();
|
||||||
abcQuery.values
|
abcQuery.values
|
||||||
..value = 'abc'
|
..value = 'abc'
|
||||||
..numbersId = numbersModel!.idAsInt
|
..numbersId = numbersModel.idAsInt
|
||||||
..createdAt = numbersModel!.createdAt
|
..createdAt = numbersModel.createdAt
|
||||||
..updatedAt = numbersModel!.updatedAt;
|
..updatedAt = numbersModel.updatedAt;
|
||||||
var abcOpt = await (abcQuery.insert(executor));
|
var abcOpt = await (abcQuery.insert(executor));
|
||||||
expect(abcOpt.isPresent, true);
|
expect(abcOpt.isPresent, true);
|
||||||
abcOpt.ifPresent((abc) {
|
abcOpt.ifPresent((abc) {
|
||||||
|
|
Loading…
Reference in a new issue