mirror of https://github.com/AMT-Cheif/drift.git
Fixed trailing comma bug and nameOfCreationMethod
This commit is contained in:
parent
23de4c5cee
commit
e99b66486d
|
@ -70,9 +70,9 @@ class QueryWriter {
|
|||
|
||||
String _nameOfCreationMethod(SqlSelectQuery select) {
|
||||
if (!select.declaredInMoorFile && !options.compactQueryMethods) {
|
||||
return select.name;
|
||||
} else {
|
||||
return '${select.name}Query';
|
||||
} else {
|
||||
return select.name;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ class QueryWriter {
|
|||
|
||||
_writeCustomSelectStatement(nested.query);
|
||||
|
||||
_buffer.write('.get()');
|
||||
_buffer.write('.get(),');
|
||||
}
|
||||
}
|
||||
_buffer.write(');\n}');
|
||||
|
|
|
@ -147,6 +147,8 @@ class SqlWriter extends NodeSqlBuilder {
|
|||
query!.placeholders.singleWhere((p) => p.astNode == e);
|
||||
|
||||
_writeRawInSpaces('\${${placeholderContextName(moorPlaceholder)}.sql}');
|
||||
} else if (e is NestedQueryColumn) {
|
||||
_out.write('0');
|
||||
} else {
|
||||
return super.visitMoorSpecificNode(e, arg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue