|
static | addCoreQueries () |
|
static | addPackageQueries ($package) |
|
static | addAssetTypeQueries ($assetType) |
|
static | bakeQueriesFile ($systemName) |
|
static | bakeQueryMethod ($systemName, $queryName) |
|
static | findRollbackBindVars ($queryBody) |
|
static | processQueriesFile ($systemName, $fileName) |
|
static | getSystemSchemaDocument ($systemName) |
|
static | addSystemSchema ($systemName) |
|
static | addSystemQueries ($systemName) |
|
static | processQueriesFile ($systemName, $fileName) |
|
static | mergeQuery ($systemName, $queryName) |
|
static | generateQueryXML ($systemName, $queryName) |
|
static | queryXMLExists ($systemName, $queryName) |
|
static | getQueryXML ($systemName, $queryName) |
|
static | saveQueryXML ($system, $queryName, DomDocument $doc) |
|
static | addQuery ($systemName, DomElement $query) |
|
static | addQueryFragment ($systemName, DomElement $fragment) |
|
static | addSubQuery ($systemName, DomElement $subQuery) |
|
static | bakeQueriesFile ($systemName) |
|
static | bakeQueryMethod ($systemName, $queryName) |
|
static | printSubQueries ($systemName, $queryName) |
|
static | getHookCodeId ($hookId) |
|
static | getHookArrayId ($hookId) |
|
static | getSeperator ($tagName) |
|
static | parseSchema (DomElement $schema) |
|
static | validateQueries (DomElement $queries) |
|
static | queryIdIsUnique (DomDocument $doc, DomElement $query) |
|
static | validateQuery (DomElement $query) |
|
static | getQueryType (DomElement $query) |
|
static | fragmentExists ($system, $queryid, $hookid) |
|
static | convertToSql (DomElement $xmlQuery, array $sqlArray=array()) |
|
static | getConverter ($dbType=NULL) |
|
static | getTableColumnTypes ($systemid, $table, $column=NULL) |
|
static | getQuerySource ($systemid, $queryid) |
|
static | createSystemOvenPath ($system) |
|
static | loadQueriesXML ($systemid) |
|
static | getBakedQueryFileName ($systemid, $queryid) |
|
static | loadBakedQuery ($systemid, $queryid) |
|
static | loadSystemSchemaXML ($systemid) |
|
static | constructSql (DomElement $query) |
|
static | getHookPrefix () |
|
static | getComparisonOperators ($type=NULL) |
|
static | getDatabaseType ($dsn=NULL) |
|
|
static | _printBindings ($systemName, $queryName, $printBindings=TRUE) |
|
static | _queryRequiresRollback ($systemName, $queryName) |
|
static | _tableRequiresRollback ($table) |
|
static | _fieldRequiresOciClob ($table, $field) |
|
static | _createRollbackXML ($systemName, DOMNode $queryNode) |
|
static | _dbDropTable ($tableName, DALConverter $converter=NULL) |
|
static | _dbTableExists ($tableName, DALConverter $converter=NULL) |
|
static | _printAlternateAssertions (DomElement $alternate, $contents) |
|
static | _recurseAddAssertion (array $assertions, array $currentStack=array()) |
|
static | _recursePrintAssertions (array $tree, DomElement $baseQuery, $baseQueryId, $level=0) |
|
static | _mergeAllAssertions (DomElement $baseQuery, array $assertions) |
|
static | _getQueryAssertions ($systemName, $queryName) |
|
static | _getAssertionVariableName (DomElement $assertion) |
|
static | _combineFragment (DomElement $query, DomElement $fragment) |
|
static | _prepareFragment (DomElement $query) |
|
static | _printAssertionCalls (array $assertions) |
|
static | _printAssertionInitialisation (DomElement $assertion) |
|
static | _printAssertionArgument (DomElement $argNode) |
|
static | _printNodeSql (DomElement $query, $baseId='', array $idParts=array()) |
|
static | _writeQueryObject ($id, array $sqlArray, $sql) |
|
static | _printPlaceHolderVariables ($systemName, $queryName) |
|
static | _generateHookArray ($systemName, $queryName) |
|
static | _printHookCode (array $hookIds) |
|
static | _printKeywords ($systemName, $queryName) |
|
static | _printBindings ($systemName, $queryName, $printBindings=TRUE) |
|
static | _extractBindings (DomElement $fragment) |
|
static | _extractKeywords (DomElement $fragment) |
|
static | _extractPlaceHolders (DomElement $fragment) |
|
static | _getPdoDataType ($systemId, $table, $column, $dataType=NULL) |
|
Definition at line 45 of file MatrixDALBaker.inc.
static _fieldRequiresOciClob |
( |
|
$table, |
|
|
|
$field |
|
) |
| |
|
staticprotected |
Determines from the MySource Matrix tables.xml schema whether a certain field is defined as a CLOB in Oracle.
This is necessary to know for Oracle, as there is an extra step that must be handled - a "LOB descriptor" must be made for a field, and then that descriptor is bound, rather than the field value itself.
Even when PDO works again, the query must be rewritten in a different way because of how Oracle handles LOB fields.
- Parameters
-
string | $table | The table to be searched for. |
string | $field | The field to be searched for. |
- Since
- MySource 3.18.0 RC2
- Returns
- boolean
Definition at line 561 of file MatrixDALBaker.inc.
static _printBindings |
( |
|
$systemName, |
|
|
|
$queryName, |
|
|
|
$printBindings = TRUE |
|
) |
| |
|
staticprotected |
Prints code to prepare the query and bind the placeholders to data.
This returns the code that is executed after the $sql variable is obtained from the assertion's conditions. The $dbh variable is initialised by getting the database connection from the DAL. Using the connection, the obtained $sql is prepared. All bindings are then obtained from the XML for the query. If they are a placeholder for a hard-coded value, then the placeholder is bound to the initialised variable, otherwise, the binding is done for an index into the passed $data array.
- Parameters
-
string | $systemName | The system to print the bindings for. |
string | $queryName | The query to print the bindings for. |
boolean | $printBindings | If TRUE, will print bindings, otherwise will print entries into the query array. |
- Since
- 4.0.0
- Returns
- string
Definition at line 321 of file MatrixDALBaker.inc.
static _queryRequiresRollback |
( |
|
$systemName, |
|
|
|
$queryName |
|
) |
| |
|
staticprotected |
Determines from the MySource Matrix tables.xml schema(s) whether a query requires a rollback version to be generated for it.
This will be the case if any of the tables it uses requires a rollback table.
This function will only return a positive result for SELECT queries - queries that involve manipulation have their rollback actions covered by the trigger system. If the query is not a SELECT query, then there will be no tables found, and therefore this function will return in the negative.
TODO: need to check to see whether SELECT parts of INSERT...SELECT combination queries need this too - probably not, as you are very unlikely to have to add non-live data from another table.
TODO: need to implement SELECT sub-query checking for SELECT...SELECT situations.
- Parameters
-
string | $systemName | The system to search for. |
string | $queryName | The query to search for. |
- Since
- MySource 3.18.0 RC1
- Returns
- boolean
Definition at line 453 of file MatrixDALBaker.inc.
static bakeQueryMethod |
( |
|
$systemName, |
|
|
|
$queryName |
|
) |
| |
|
static |
Bakes out a method for a single query.
Reads in the XML files that have been generated for this query, gets all fragments and their assertions, and bakes out an appropriate method that will return an SQL statement that corresponds to the current system state and the systems currently installed.
- Parameters
-
string | $systemName | The name of the system to which the query belongs. |
string | $queryName | The name of the query to bake. |
- Since
- 4.0.0
- Returns
- string
Definition at line 221 of file MatrixDALBaker.inc.