Skip to content

Commit

Permalink
autoincrement generated and optional for has default generated config
Browse files Browse the repository at this point in the history
  • Loading branch information
juancastillo0 committed Dec 7, 2023
1 parent 9f52613 commit ef2afbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,8 @@ class SqlTypeFinder {
ColumnOptionCheck() => null,
ColumnOptionComment() => null,
ColumnOptionGenerated() => generated = true,
ColumnOptionDialectSpecific(:final value) => generated = generated ||
const ['AUTOINCREMENT', 'AUTO_INCREMENT'].contains(value),
_ => null,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ${ReCase(fileName).pascalCase}Queries {
);
final fields = t.value.fields
.map((e) =>
"(name: '${e.name}', type: ${e.type.instantiation}, hasDefault: ${e.defaultValue != null})")
"(name: '${e.name}', type: ${e.type.instantiation}, hasDefault: ${e.optional || e.defaultValue != null})")
.join(',');

final generics = '<${className}, ${addedUpdate ?? className}>';
Expand Down

0 comments on commit ef2afbe

Please sign in to comment.