namespace \webfiori\database
abstract class Table
Class Methods Summary
Class Methods Details
Parameters:
- string $name The name of the table. If empty string is given, the value 'new_table' will be used as default.
Parameters:
Parameters:
- array $cols An array that holds the columns as an associative array. The indices should represent columns keys.
Parameters:
- Table|AbstractQuery|string $refTable The referenced table. It is the table that will contain original values. This value can be an object of type 'Table', an object of type 'AbstractQuery' or the namespace of a class which is a sub-class of the class 'AbstractQuery'.
- array $cols An associative array that contains key columns. The indices must be names of columns which exist in 'this' table and the values must be columns from referenced table. It is possible to provide an indexed array. If an indexed array is given, the method will assume that the two tables have same column key.
- string $keyname The name of the key.
- string $onupdate The 'on update' condition for the key. it can be one of the following:
- set null
- cascade
- restrict
- set default
- no action
- string $ondelete The 'on delete' condition for the key. it can be one of the following:
- set null
- cascade
- restrict
- set default
- no action
Parameters:
- int $index The index of the column.
Parameters:
- string $key The name of column key.
Parameters:
- string $key The name of column as it appears in the database.
Parameters:
- string $keyName The name of the foreign key as specified when it was added to the table.
Parameters:
- string $colName The name of the column as it appears in database.
Parameters:
- string $keyName The name of the key.
Parameters:
- string $colKey Key name of the column.
Parameters:
- string $keyName The name of the foreign key.
Parameters:
Parameters:
- string $name The name of the table. Must be non-empty string in order to set.
Parameters:
Parameters:
- boolean $withDbPrefix True to prefix table name with database name. false to not prefix table name with database name.