|
Lightweight 0.20250904.0
|
Query builder for building ALTER TABLE queries. More...
#include <Migrate.hpp>
Public Member Functions | |
| SqlAlterTableQueryBuilder (SqlAlterTablePlan &plan) | |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | RenameTo (std::string_view newTableName) |
| Renames the table. | |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AddColumn (std::string columnName, SqlColumnTypeDefinition columnType) |
| Adds a new column to the table that is non-nullable. | |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AddNotRequiredColumn (std::string columnName, SqlColumnTypeDefinition columnType) |
| Adds a new column to the table that is nullable. | |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AlterColumn (std::string columnName, SqlColumnTypeDefinition columnType, SqlNullable nullable) |
| Alters the column to have a new non-nullable type. | |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | RenameColumn (std::string_view oldColumnName, std::string_view newColumnName) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | DropColumn (std::string_view columnName) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AddIndex (std::string_view columnName) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AddUniqueIndex (std::string_view columnName) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | DropIndex (std::string_view columnName) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AddForeignKey (std::string columnName, SqlForeignKeyReferenceDefinition referencedColumn) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AddForeignKeyColumn (std::string columnName, SqlColumnTypeDefinition columnType, SqlForeignKeyReferenceDefinition referencedColumn) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | AddNotRequiredForeignKeyColumn (std::string columnName, SqlColumnTypeDefinition columnType, SqlForeignKeyReferenceDefinition referencedColumn) |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & | DropForeignKey (std::string columnName) |
Drops a foreign key for the column columnName from the table. | |
Query builder for building ALTER TABLE queries.
Definition at line 71 of file Migrate.hpp.
|
inlineexplicit |
Definition at line 74 of file Migrate.hpp.
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::AlterColumn | ( | std::string | columnName, |
| SqlColumnTypeDefinition | columnType, | ||
| SqlNullable | nullable | ||
| ) |
Alters the column to have a new non-nullable type.
| columnName | The name of the column to alter. |
| columnType | The new type of the column. |
| nullable | The new nullable state of the column. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::RenameColumn | ( | std::string_view | oldColumnName, |
| std::string_view | newColumnName | ||
| ) |
Renames a column.
| oldColumnName | The old column name. |
| newColumnName | The new column name. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::DropColumn | ( | std::string_view | columnName | ) |
Drops a column from the table.
| columnName | The name of the column to drop. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::AddIndex | ( | std::string_view | columnName | ) |
Add an index to the table for the specified column.
| columnName | The name of the column to index. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::AddUniqueIndex | ( | std::string_view | columnName | ) |
Add an index to the table for the specified column that is unique.
| columnName | The name of the column to index. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::DropIndex | ( | std::string_view | columnName | ) |
Drop an index from the table for the specified column.
| columnName | The name of the column to drop the index from. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::AddForeignKey | ( | std::string | columnName, |
| SqlForeignKeyReferenceDefinition | referencedColumn | ||
| ) |
Adds a foreign key column columnName to referencedColumn to an existing column.
| columnName | The name of the column to add. |
| referencedColumn | The column to reference. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::AddForeignKeyColumn | ( | std::string | columnName, |
| SqlColumnTypeDefinition | columnType, | ||
| SqlForeignKeyReferenceDefinition | referencedColumn | ||
| ) |
Adds a foreign key column columnName of type columnType to referencedColumn.
| columnName | The name of the column to add. |
| columnType | The type of the column to add. |
| referencedColumn | The column to reference. |
| LIGHTWEIGHT_API SqlAlterTableQueryBuilder & Lightweight::SqlAlterTableQueryBuilder::AddNotRequiredForeignKeyColumn | ( | std::string | columnName, |
| SqlColumnTypeDefinition | columnType, | ||
| SqlForeignKeyReferenceDefinition | referencedColumn | ||
| ) |
Adds a nullable foreign key column columnName of type columnType to referencedColumn.
| columnName | The name of the column to add. |
| columnType | The type of the column to add. |
| referencedColumn | The column to reference. |