TableDb class
Defines a table in a database. It consists of a collection of ColumnDb objects and a table name.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addColumn(
ColumnDb columnDb) → void -
Add a
columnDb
in the column list. Throw a exception if the name of the column already exist. -
checkInconsistentTable(
) → void - Check if the table make no sense.
-
existColumnWith(
String name) → bool - Return if there is a column with that name.
-
getColumns(
) → List< ColumnDb> - Return all columns from this table.
-
getCreateDbRequest(
) → String - Return the to create this table based on the columns it currently has.
-
getName(
) → String -
getPrimaryColumn(
) → ColumnDb - Return the primary key column of the table.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeColumn(
ColumnDb column) → bool -
Remove the
column
passed. -
replaceColumn(
ColumnDb newColumn, bool whereFunction(ColumnDb element)) → void -
Replace a
newColumn
with the first column that satisfywhereFunction
. -
searchColumnAndRemoveIt(
bool whereFunction(ColumnDb element)) → void -
Search and remove all columns from this table that satisfy
whereFunction
. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
areUniqueColumnNames(
List< ColumnDb> columns) → bool - Check if a list of column has unique names.