Structure
SQLAlterEnum
An expression representing an
ALTER TYPE query. Used to add new cases to enumeration types.struct SQLAlterEnum
Overview
ALTER TYPE "name" ADD VALUE 'value';
This expression does not check whether the current dialect supports separate enumeration types; users should take care not to use it with incompatible drivers.
See SQLAlterEnumBuilder.
Note
Despite both its name and the query it represents, this expression can neither perform arbitrary enum alterations, nor represent the full range of possible ALTER TYPE queries, even in dialects which support them in the first place. This would probably have been better named something like SQLAddEnumCase.
Topics
Instance Properties
var name: any SQLExpressionThe name of the type to alter.var value: (any SQLExpression)?A new enumeration value to add to an existing type.
Instance Methods
func serialize(to: inout SQLSerializer)Invoked when a request is made to serialize the expression to raw SQL.
Relationships
Conforms To
SQLExpressionSwift.SendableSwift.SendableMetatype
See Also
Query Expressions
struct SQLAlterTableAn expression representing anALTER TABLEquery. Used to modify the structure of existing tables.struct SQLCreateEnumAn expression representing aCREATE TYPEquery. Used to create enumeration types.struct SQLCreateIndexAn expression representing aCREATE INDEXquery. Used to add indexes over columns to an existing table.struct SQLCreateTableAn expression representing aCREATE TABLEquery. Used to create new tables.struct SQLCreateTriggerAn expression representing aCREATE TRIGGERquery. Used to create new triggers for actions on a table.struct SQLDeleteAn expression representing aCREATE TRIGGERquery. Used to remove rows from a table.struct SQLDropEnumAn expression representing aDROP TYPEquery. Used to delete enumeration types.struct SQLDropIndexAn expression representing aDROP INDEXquery. Used to delete indexes from tables.struct SQLDropTableAn expression representing aDROP TABLEquery. Used to delete entire tables.struct SQLDropTriggerAn expression representing aDROP TRIGGERquery. Used to delete triggers.struct SQLInsertAn expression representing anINSERTquery. Used to add new rows to a table.struct SQLSelectAn expression representing aSELECTquery. Used to retrieve rows and expression results from a database.struct SQLUnionAn expression representing two or moreSELECTqueries joined byUNIONclauses. Used to merge the results of multiple queries into a single result set.struct SQLUpdateAn expression representing anUPDATEquery. Used to modify existing rows in a single table.