
$columns = $this -> quoteColumnName ( $col ) $columns = preg_split ( '/\s*,\s*/', $columns ,- 1, PREG_SPLIT_NO_EMPTY ) Public function addForeignKey ( $name, $table, $columns, $refTable, $refColumns, $delete = null, $update = null ) The SQL statement for adding a foreign key constraint to an existing table. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL If there are multiple columns, separate them with commas or pass as an array of column names. The name of the column that the foreign key references to. The table that the foreign key references to. The name of the column to that the constraint will be added on. The table that the foreign key constraint will be added to. Public string addForeignKey(string $name, string $table, string|array $columns, string $refTable, string|array $refColumns, string $delete=NULL, string $update=NULL) Resets the sequence value of a table's primary key.īuilds a SQL statement for truncating a DB table. Quotes a simple table name for use in a query.īuilds a SQL statement for renaming a column.īuilds a SQL statement for renaming a DB table.

Quotes a simple column name for use in a query. Returns the metadata for all tables in the database.Ĭhecks whether the named event has attached handlers.ĭetermines whether a property is defined. Obtains the metadata for the named table. Returns the list of attached event handlers for an event. Returns the SQL command builder for this connection.


Returns a property value, an event handler list or a behavior based on its name.īuilds a SQL statement for adding a new DB column.īuilds a SQL statement for adding a foreign key constraint to an existing table.īuilds a SQL statement for adding a primary key constraint to an existing table.īuilds a SQL statement for changing the definition of a column.Īttaches a list of behaviors to the component.ĭetermines whether a property can be read.ĭetermines whether a property can be set.īuilds a SQL statement for creating a new index.īuilds a SQL statement for creating a new DB table.ĭetaches all behaviors from the component.ĭisables all behaviors attached to this component.īuilds a SQL statement for dropping a DB column.īuilds a SQL statement for dropping a foreign key constraint.īuilds a SQL statement for dropping an index.īuilds a SQL statement for removing a primary key constraint to an existing table.īuilds a SQL statement for dropping a DB table.Įnables all behaviors attached to this component.Įvaluates a PHP expression or callback under the context of this component.Ĭonverts an abstract column type into a physical column type. Calls the named method which is not a class method.
