Adds a unique index on the column.
The table that contains the column
The name of the column, as it is in the database
Optionaloptions: QueryRawOptions
Query options
Adds a unique constraint on the column, or a unique index if the dialect cannot add constraints to existing tables.
The table that contains the column
The name of the column, as it is in the database
Optionaloptions: QueryRawOptions
Query options
Alters a table in sqlite. Workaround for sqlite's limited alter table support.
Optionaloptions: QueryRawOptionsRuns the query that changes the column, then adds a unique key on the column.
AbstractQueryInterface#changeColumn uses this in dialects where the ALTER COLUMN query cannot add the unique key
(dialect.supports.alterColumn.unique is false).
Dialects where schema changes are transactional can override this method to do both in one transaction.
The table that contains the column
The name of the column, as it is in the database
The query that changes the column
Optionaloptions: QueryRawOptions
Query options
Optionaloptions: QueryRawOptionsOptionaloptions: QueryRawOptionsOptionaloptions: FetchDatabaseVersionOptionsReturns whether the table has a unique key (a unique constraint, a unique index, or the primary key) on exactly the given column.
Both the unique constraints and the indexes of the table are checked, because depending on the dialect, a unique key can be a unique index without a unique constraint. Snowflake does not report which columns its unique constraints are on, so they are never found there.
The table that contains the column
The name of the column, as it is in the database
Optionaloptions: QueryRawOptions
Query options
Returns whether AbstractQueryInterface#changeColumn needs to add a unique key to the column, as requested by its "unique" option. This is only the case if the table does not have a unique key on exactly that column yet, so calling changeColumn again does not add another one.
The table that contains the column
The name of the column, as it is in the database
The value of the "unique" attribute option
Optionaloptions: QueryRawOptions
Query options
Optionaloptions: ShowConstraintsOptionsOptionaloptions: QueryRawOptionsReturns the attribute with its reference moved into schema, if that reference targets the
dialect's default schema. References that target any other schema are returned untouched.
The methods in this class are not part of the public API.