Add Column.expression

This commit is contained in:
Tobe O 2019-08-17 18:24:54 -04:00
parent a05f15b3df
commit 860e8029c2

View file

@ -26,11 +26,18 @@ class Column {
/// Specifies what kind of index this column is, if any.
final IndexType indexType;
/// A custom SQL expression to execute, instead of a named column.
final String expression;
const Column(
{this.isNullable = true,
this.length,
this.type,
this.indexType = IndexType.none});
this.indexType = IndexType.none,
this.expression});
/// Returns `true` if [expression] is not `null`.
bool get hasExpression => expression != null;
}
class PrimaryKey extends Column {