|
firfuorida 0.0.1
Qt based database migration library
|
Contains information about a single table, either to create or to modify. More...
#include <Firfuorida/Table>

Public Member Functions | |
| ~Table () override | |
| Deconstructs the Table object. | |
| Column * | bigIncrements (const QString &columnName=QStringLiteral("id")) |
| Creates/modifies an unsigned big integer primary key column that auto increments with given columnName and returns a pointer to the Column object. | |
| Column * | bigInteger (const QString &columnName, uint displayWidth=0) |
Creates/modifies a signed big integer column with given columnName and displayWidth and returns a pointer to the Column object. displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | binary (const QString &columnName, uint length=255) |
| Creates/modifies a binary column with given columnName and length and returns a pointer to the Column object. | |
| Column * | bit (const QString &columnName, uint length) |
| Creates/modifies a bit column with given columnName and length and returns a pointer to the Column object. | |
| Column * | blob (const QString &columnName) |
| Creates/modifies a blob column with given columnName and returns a pointer to the Column object. | |
| Column * | boolean (const QString &columnName) |
| Creates/modifies a boolean column with given columnName and returns a pointer to the Column object. | |
| Column * | charCol (const QString &columnName, uint length=255) |
| Creates/modifies a char column with given columnName and length and returns a pointer to the Column object. | |
| Column * | date (const QString &columnName) |
| Creates/modifies a date column with given columnName and returns a pointer to the Column object. | |
| Column * | dateTime (const QString &columnName) |
| Creates/modifies a datetime column with given columnName and returns a pointer to the Column object. | |
| Column * | decimal (const QString &columnName, uint precision, uint scale) |
| Creates/modifies a signed decimal column with given columnName, precision and scale and returns a pointer to the Column object. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | doubleCol (const QString &columnName, uint precision, uint scale) |
| Creates/modifies a signed double column with given columnName, precision and scale and returns a pointer to the Column object. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| void | dropColumn (const QString &columnName) |
| Drops the column identfied by columnName from the table. | |
| Column * | enumCol (const QString &columnName, const QStringList &enums) |
| Creates/modifies an enum column with given columnName and enums and returns a pointer to the Column object. | |
| Column * | floatCol (const QString &columnName, uint precision, uint scale) |
| Creates/modifies a signed float column with given columnName, precision and scale and returns a pointer to the Column object. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | foreignKey (const QString &foreignKeyCol, const QString &referenceTable, const QString &referenceCol, const QString &constraintSymbol=QString(), const QString &indexName=QString()) |
| Creates/modifies a foreign key constraint for foreignKey that references the referenceCol at referenceTable and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. Use Column:onDelete() and/or Column::onUpdate() on the returned Column object to set reference behavior. | |
| Column * | foreignKey (const QStringList &foreignKeys, const QString &referenceTable, const QStringList &referenceCols, const QString &constraintSymbol=QString(), const QString &indexName=QString()) |
| Creates/modifies a foreign key constraint for foreignKeys that references the referenceCols at referenceTable and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. Use Column:onDelete() and/or Column::onUpdate() on the returned Column object to set reference behavior. | |
| Column * | increments (const QString &columnName=QStringLiteral("id")) |
| Creates/modifies an unsigned integer primary key column that auto increments with given columnName and returns a pointer to the Column object. | |
| Column * | index (const QString &col, const QString &indexName=QString()) |
| Creates/modifies an index for col named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future. | |
| Column * | index (const QStringList &cols, const QString &indexName=QString()) |
| Creates/modifies an index over the columns cols named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future. | |
| Column * | integer (const QString &columnName, uint displayWidth=0) |
Creates/modifies a signed integer column with given columnName and displayWidth and returns a pointer to the Column object. displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | json (const QString &columnName) |
| Creates/modifies a JSON column with given columnName and returns a pointer to the Column object. | |
| Column * | key (const QString &col, const QString &indexName=QString()) |
| Creates/modifies a key index for col named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future. | |
| Column * | key (const QStringList &cols, const QString &indexName=QString()) |
| Creates/modifies a key index over the columns cols named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future. | |
| Column * | longBlob (const QString &columnName) |
| Creates/modifies a long blob column with given columnName and returns a pointer to the Column object. | |
| Column * | longText (const QString &columnName) |
| Creates/modifies a long text column with given columnName and returns a pointer to the Column object. | |
| Column * | mediumBlob (const QString &columnName) |
| Creates/modifies a medium blob column with given columnName and returns a pointer to the Column object. | |
| Column * | mediumIncrements (const QString &columnName=QStringLiteral("id")) |
| Creates/modifies an unsigned medium integer primary key column that auto increments with given columnName and returns a pointer to the Column object. | |
| Column * | mediumInteger (const QString &columnName, uint displayWidth=0) |
Creates/modifies a signed medium integer column with given columnName and displayWidth and returns a pointer to the Column object. displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | mediumText (const QString &columnName) |
| Creates/modifies a medium text column with given columnName and returns a pointer to the Column object. | |
| Column * | numeric (const QString &columnName, uint precision, uint scale) |
| Creates/modifies a signed numeric column with given columnName, precision and scale and returns a pointer to the Column object. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | primaryKey (const QString &col, const QString &constraintSymbol=QString()) |
| Creates/modifies a primary key index for col named constraintSymbol and returns a pointer to the Column object. The constraintSymbol is optional but helps to identify the index in the future. | |
| Column * | primaryKey (const QStringList &cols, const QString &constraintSymbol=QString()) |
| Creates/modifies a primary key index over the columns cols named constraintSymbol and returns a pointer to the Column object. The constraintSymbol is optional but helps to identify the index in the future. | |
| Column * | set (const QString &columnName, const QStringList &setList) |
| Creates/modifies a set column with given columnName and setList and returns a pointer to the Column object. | |
| void | setCharset (const QString &charset) |
| Set the default charset when creating a new table or change it for an existing table. | |
| void | setCollation (const QString &collation) |
| Set the collation when creating a new table or change it for an existing table. | |
| void | setComment (const QString &comment) |
| Sets a comment when creating a new table of change it for an existing table. | |
| void | setEngine (const QString &engine) |
| Set the used engine when creating a new table or change it for an existing table. | |
| void | setIsTemporary (bool isTemporary=true) |
Marks the table as temporary if isTemporary is set to true. | |
| Column * | smallIncrements (const QString &columnName=QStringLiteral("id")) |
| Creates/modifies an unsigned small integer primary key column that auto increments with given columnName and returns a pointer to the Column object. | |
| Column * | smallInteger (const QString &columnName, uint displayWidth=0) |
Creates/modifies a signed small integer column with given columnName and displayWidth and returns a pointer to the Column object. displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | text (const QString &columnName) |
| Creates/modifies a text column with given columnName and returns a pointer to the Column object. | |
| Column * | time (const QString &columnName) |
| Creates/modifies a time column with given columnName and returns a pointer to the Column object. | |
| Column * | timestamp (const QString &columnName) |
| Creates/modifies a timestamp column with given columnName and returns a pointer to the Column object. | |
| Column * | tinyBlob (const QString &columnName) |
| Creates/modifies a tiny blob column with given columnName and returns a pointer to the Column object. | |
| Column * | tinyIncrements (const QString &columnName=QStringLiteral("id")) |
| Creates/modifies an unsigned tiny integer primary key column that auto increments with given columnName and returns a pointer to the Column object. | |
| Column * | tinyInteger (const QString &columnName, uint displayWidth=0) |
Creates/modifies a signed tiny integer column with given columnName and displayWidth displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned. | |
| Column * | tinyText (const QString &columnName) |
| Creates/modifies a tiny text column with given columnName and returns a pointer to the Column object. | |
| Column * | uniqueIndex (const QString &col, const QString &constraintSymbol=QString(), const QString &indexName=QString()) |
| Creates/modifies a unique index for col with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. | |
| Column * | uniqueIndex (const QStringList &cols, const QString &constraintSymbol=QString(), const QString &indexName=QString()) |
| Creates/modifies a unique index over the columns cols with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. | |
| Column * | uniqueKey (const QString &col, const QString &constraintSymbol=QString(), const QString &indexName=QString()) |
| Creates/modifies a unique key index for col with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. | |
| Column * | uniqueKey (const QStringList &cols, const QString &constraintSymbol=QString(), const QString &indexName=QString()) |
| Creates/modifies a unique key index over the columns cols with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. | |
| Column * | varBinary (const QString &columnName, uint length=255) |
| Creates/modifies a varbinary column with given columnName and length and returns a pointer to the Column object. | |
| Column * | varChar (const QString &columnName, uint length=255) |
| Creates/modifies a varchar column with given columnName and length and returns a pointer to the Column object. | |
| Column * | year (const QString &columnName) |
| Creates/modifies a year column with given columnName and returns a pointer to the Column object. | |
Contains information about a single table, either to create or to modify.
The Table object can only be created by functions of the Migration class.
example.h
example.cpp
|
override |
Deconstructs the Table object.
Creates/modifies an unsigned big integer primary key column that auto increments with given columnName and returns a pointer to the Column object.
Creates/modifies a signed big integer column with given columnName and displayWidth and returns a pointer to the Column object. displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned.
Creates/modifies a binary column with given columnName and length and returns a pointer to the Column object.
Creates/modifies a bit column with given columnName and length and returns a pointer to the Column object.
Creates/modifies a blob column with given columnName and returns a pointer to the Column object.
Creates/modifies a boolean column with given columnName and returns a pointer to the Column object.
Creates/modifies a char column with given columnName and length and returns a pointer to the Column object.
Creates/modifies a date column with given columnName and returns a pointer to the Column object.
Creates/modifies a datetime column with given columnName and returns a pointer to the Column object.
| void Table::dropColumn | ( | const QString & | columnName | ) |
Drops the column identfied by columnName from the table.
| Column * Table::enumCol | ( | const QString & | columnName, |
| const QStringList & | enums ) |
Creates/modifies an enum column with given columnName and enums and returns a pointer to the Column object.
| Column * Table::foreignKey | ( | const QString & | foreignKeyCol, |
| const QString & | referenceTable, | ||
| const QString & | referenceCol, | ||
| const QString & | constraintSymbol = QString(), | ||
| const QString & | indexName = QString() ) |
Creates/modifies a foreign key constraint for foreignKey that references the referenceCol at referenceTable and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. Use Column:onDelete() and/or Column::onUpdate() on the returned Column object to set reference behavior.
| Column * Table::foreignKey | ( | const QStringList & | foreignKeys, |
| const QString & | referenceTable, | ||
| const QStringList & | referenceCols, | ||
| const QString & | constraintSymbol = QString(), | ||
| const QString & | indexName = QString() ) |
Creates/modifies a foreign key constraint for foreignKeys that references the referenceCols at referenceTable and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future. Use Column:onDelete() and/or Column::onUpdate() on the returned Column object to set reference behavior.
Creates/modifies an unsigned integer primary key column that auto increments with given columnName and returns a pointer to the Column object.
Creates/modifies an index for col named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future.
| Column * Table::index | ( | const QStringList & | cols, |
| const QString & | indexName = QString() ) |
Creates/modifies an index over the columns cols named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future.
Creates/modifies a JSON column with given columnName and returns a pointer to the Column object.
Creates/modifies a key index for col named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future.
| Column * Table::key | ( | const QStringList & | cols, |
| const QString & | indexName = QString() ) |
Creates/modifies a key index over the columns cols named indexName and returns a pointer to the Column object. The indexName is optional but helps to identify the index in the future.
Creates/modifies a long blob column with given columnName and returns a pointer to the Column object.
Creates/modifies a long text column with given columnName and returns a pointer to the Column object.
Creates/modifies a medium blob column with given columnName and returns a pointer to the Column object.
Creates/modifies an unsigned medium integer primary key column that auto increments with given columnName and returns a pointer to the Column object.
Creates/modifies a signed medium integer column with given columnName and displayWidth and returns a pointer to the Column object. displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned.
Creates/modifies a medium text column with given columnName and returns a pointer to the Column object.
Creates/modifies a primary key index for col named constraintSymbol and returns a pointer to the Column object. The constraintSymbol is optional but helps to identify the index in the future.
| Column * Table::primaryKey | ( | const QStringList & | cols, |
| const QString & | constraintSymbol = QString() ) |
Creates/modifies a primary key index over the columns cols named constraintSymbol and returns a pointer to the Column object. The constraintSymbol is optional but helps to identify the index in the future.
| Column * Table::set | ( | const QString & | columnName, |
| const QStringList & | setList ) |
Creates/modifies a set column with given columnName and setList and returns a pointer to the Column object.
| void Table::setCharset | ( | const QString & | charset | ) |
Set the default charset when creating a new table or change it for an existing table.
| void Table::setCollation | ( | const QString & | collation | ) |
Set the collation when creating a new table or change it for an existing table.
| void Table::setComment | ( | const QString & | comment | ) |
Sets a comment when creating a new table of change it for an existing table.
2048 characters. | void Table::setEngine | ( | const QString & | engine | ) |
Set the used engine when creating a new table or change it for an existing table.
| void Table::setIsTemporary | ( | bool | isTemporary = true | ) |
Marks the table as temporary if isTemporary is set to true.
Creates/modifies an unsigned small integer primary key column that auto increments with given columnName and returns a pointer to the Column object.
Creates/modifies a signed small integer column with given columnName and displayWidth and returns a pointer to the Column object. displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned.
Creates/modifies a text column with given columnName and returns a pointer to the Column object.
Creates/modifies a time column with given columnName and returns a pointer to the Column object.
Creates/modifies a timestamp column with given columnName and returns a pointer to the Column object.
Creates/modifies a tiny blob column with given columnName and returns a pointer to the Column object.
Creates/modifies an unsigned tiny integer primary key column that auto increments with given columnName and returns a pointer to the Column object.
Creates/modifies a signed tiny integer column with given columnName and displayWidth displayWidth will only be set if greate than 0. Use Column::unsigned() on the returned Column object to make the column unsigned.
Creates/modifies a tiny text column with given columnName and returns a pointer to the Column object.
| Column * Table::uniqueIndex | ( | const QString & | col, |
| const QString & | constraintSymbol = QString(), | ||
| const QString & | indexName = QString() ) |
Creates/modifies a unique index for col with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future.
| Column * Table::uniqueIndex | ( | const QStringList & | cols, |
| const QString & | constraintSymbol = QString(), | ||
| const QString & | indexName = QString() ) |
Creates/modifies a unique index over the columns cols with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future.
| Column * Table::uniqueKey | ( | const QString & | col, |
| const QString & | constraintSymbol = QString(), | ||
| const QString & | indexName = QString() ) |
Creates/modifies a unique key index for col with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future.
| Column * Table::uniqueKey | ( | const QStringList & | cols, |
| const QString & | constraintSymbol = QString(), | ||
| const QString & | indexName = QString() ) |
Creates/modifies a unique key index over the columns cols with constraintSymbol named indexName and returns a pointer to the Column object. constraintSymbol and indexName are optional but helps to identify the index in the future.
Creates/modifies a varbinary column with given columnName and length and returns a pointer to the Column object.
Creates/modifies a varchar column with given columnName and length and returns a pointer to the Column object.