dbtool library

Classes

CopyType
A special type used with copy to copy fields from another map
IndexInfo
Information of an index
PrimaryKeyType
A special type used with primaryKey to define a primary key with multiple columns
ReferenceType
RuleInfo
The rule info
SqlType
Represents a SQL type

Constants

copy → const String
Builtin name for special actions.
copy1 → const String
Builtin name for special actions.
copy2 → const String
Builtin name for special actions.
define → const String
Builtin name for special actions.
define1 → const String
Builtin name for special actions.
define2 → const String
Builtin name for special actions.
define3 → const String
Builtin name for special actions.
notNull → const String
nullable → const String
onDeleteCascade → const String
onDeleteSetNull → const String
primaryKey → const String
Builtin name for special actions.

Functions

AutoOid() SqlType
Bigint({String constraint = notNull}) SqlType
Bigserial({String constraint = notNull}) SqlType
Boolean({String constraint = notNull}) SqlType
Char(int length, {String constraint = notNull}) SqlType
Citext({String constraint = notNull}) SqlType
Copy(Map<String, SqlType> source) SqlType
Copyies the definition from another source. For example,
create(Connection conn, double version, Map<String, Map<String, SqlType>> tables, Map<String, IndexInfo> indexes, Map<String, RuleInfo> rules) Future
Creates the tables specified in version.
Define(String definition) SqlType
Defines definition, which is generated directly. For example,
Double({String constraint = notNull}) SqlType
Index(String table, List<String> columns, {bool unique = false, String? using, String? ops, String? where}) IndexInfo
Integer({String constraint = notNull}) SqlType
Json({String constraint = notNull}) SqlType
Jsonb({String constraint = notNull}) SqlType
Oid() SqlType
PrimaryKey(Iterable<String> columns) SqlType
A multi-column primary key.
purge(Connection conn, Map<String, Map<String, SqlType>> tables, Map<String, IndexInfo> indexes, Map<String, RuleInfo> rules) Future
Purges all data and schemas.
Real({String constraint = notNull}) SqlType
Reference(String otype, {String constraint = notNull, String cascade = "", String column = fdOid}) SqlType
A reference that refers to a record from another table. It creates a foreign-key constraint to ensure the relationship.
Rule(String table, String rule) RuleInfo
Serial({String constraint = notNull}) SqlType
Smallint({String constraint = notNull}) SqlType
Text({String constraint = notNull}) SqlType
Timestamptz({String constraint = notNull}) SqlType
Tsvector({String constraint = notNull}) SqlType
UnboundReference({String? otype, String constraint = notNull}) SqlType
A reference that refers to a record from another table.