DALSchemaParser.
Parses anything that is related to schemas (create table, constraints, etc).
- Since
- 4.0.0
Definition at line 23 of file DALSchemaParser.inc.
static getConstraintsFromParent |
( |
DomElement |
$parent | ) |
|
|
static |
Returns constraints from parent node.
- Parameters
-
DomElement | $parent | Parent node. |
- Since
- 4.0.0
- Returns
- array
Definition at line 199 of file DALSchemaParser.inc.
static getSchemaUdts |
( |
DomElement |
$schema | ) |
|
|
static |
Converts XML schema UDTs to php array.
- Parameters
-
DomElement | $schema | Schema node of a schema. |
- Since
- 4.0.0
- Returns
- array
Definition at line 131 of file DALSchemaParser.inc.
static getTableColumns |
( |
DomElement |
$table | ) |
|
|
static |
Converts XML table columns to php array.
- Parameters
-
DomElement | $table | Table node of a schema. |
- Since
- 4.0.0
- Returns
- array
- Exceptions
-
Definition at line 415 of file DALSchemaParser.inc.
static getTableConstraints |
( |
DomElement |
$table | ) |
|
|
static |
Converts XML table constraints to php array.
- Parameters
-
DomElement | $table | Table node of a schema. |
- Since
- 4.0.0
- Returns
- array
Definition at line 229 of file DALSchemaParser.inc.
static getTableIndexes |
( |
DomElement |
$table | ) |
|
|
static |
Converts XML table indexes to php array.
- Parameters
-
DomElement | $table | Table node of a schema. |
- Since
- 4.0.0
- Returns
- array
Definition at line 356 of file DALSchemaParser.inc.
static getTableSequences |
( |
DomElement |
$table | ) |
|
|
static |
Converts XML table sequences to php array.
- Parameters
-
DomElement | $table | Table node of a schema. |
- Since
- 4.0.0
- Returns
- array
Definition at line 174 of file DALSchemaParser.inc.
static parse |
( |
DomElement |
$schema | ) |
|
|
static |
Converts XML schema to php array.
- Parameters
-
DomElement | $schema | Schema node of a schema. |
- Since
- 4.0.0
- Returns
- array
Definition at line 98 of file DALSchemaParser.inc.
static tableHasColumn |
( |
DomElement |
$table, |
|
|
|
$columnName |
|
) |
| |
|
static |
Returns true if table has the specified column listed in its columns tag.
- Parameters
-
DomElement | $table | Xml elements of the table. |
string | $columnName | Search for this column name. |
- Since
- 4.0.0
- Returns
- boolean
- Exceptions
-
Definition at line 1082 of file DALSchemaParser.inc.
static validate |
( |
DomElement |
$schema | ) |
|
|
static |
Validates the given schema.
Validation will make sure all required elements, attributes, etc are available and contain no errors. Throws ChannelException if any errors are found.
- Parameters
-
DomElement | $schema | Xml elements for a single schema. |
- Since
- 4.0.0
- Returns
- void
- Exceptions
-
Definition at line 485 of file DALSchemaParser.inc.
static validateConstraints |
( |
DomElement |
$parent, |
|
|
|
$prefix = '' |
|
) |
| |
|
static |
Validates general constraint rules.
- Parameters
-
DomElement | $parent | Parent node of the constraints. |
string | $prefix | Exception message prefix. |
- Since
- 4.0.0
- Returns
- void
Definition at line 751 of file DALSchemaParser.inc.
static validateSchemaUdts |
( |
DomElement |
$schema | ) |
|
|
static |
Checks if the given schema has valid UDTs.
Throws DALParserException if any errors found.
- Parameters
-
DomElement | $schema | Xml elements of the schema. |
- Since
- 4.0.0
- Returns
- void
- Exceptions
-
Definition at line 1006 of file DALSchemaParser.inc.
static validateTable |
( |
DomElement |
$table | ) |
|
|
static |
Validates the given table.
Validation will make sure all required elements, attributes, etc are available and contain no errors. Throws ChannelException if any errors are found.
- Parameters
-
DomElement | $table | Xml elements for a single table. |
- Since
- 4.0.0
- Returns
- void
- Exceptions
-
Definition at line 518 of file DALSchemaParser.inc.
static validateTableColumns |
( |
DomElement |
$table | ) |
|
|
static |
Validates given table's columns.
Throws ChannelException on error.
- Parameters
-
DomElement | $table | Xml node of the table. |
- Since
- 4.0.0
- Returns
- boolean
- Exceptions
-
Definition at line 551 of file DALSchemaParser.inc.
static validateTableConstraints |
( |
DomElement |
$table | ) |
|
|
static |
Checks if the given table has valid constraints.
I.e. table must have a primary-key. Throws DALParserException.
- Parameters
-
DomElement | $table | Xml elements of the table. |
- Since
- 4.0.0
- Returns
- boolean
- Exceptions
-
Definition at line 665 of file DALSchemaParser.inc.
static validateTableIndexes |
( |
DomElement |
$table | ) |
|
|
static |
Checks if the given table has valid indexes.
Throws DALParserException if any errors found.
- Parameters
-
DomElement | $table | Xml elements of the table. |
- Since
- 4.0.0
- Returns
- void
- Exceptions
-
DALParserException | If an index doesn't have a name, doesn't have any columns, or references a column that doesn't exist. |
Definition at line 923 of file DALSchemaParser.inc.
static validateTableSequences |
( |
DomElement |
$table | ) |
|
|
static |
Checks if the given table has valid sequences.
Throws DALParserException if any errors found.
- Parameters
-
DomElement | $table | Xml elements of the table. |
- Since
- 4.0.0
- Returns
- void
- Exceptions
-
Definition at line 970 of file DALSchemaParser.inc.
static validSchemaColumnType |
( |
DomElement |
$table, |
|
|
|
$type |
|
) |
| |
|
static |
Determines if the given type is a valid column type.
Checks UDTs, CDTs, and FUDTs. Throws DALParserException.
- Parameters
-
DomElement | $table | Table or schema that this column belongs to. |
string | $type | Type of the column. |
- Since
- 4.0.0
- Returns
- boolean
Definition at line 624 of file DALSchemaParser.inc.
The documentation for this class was generated from the following file: