TYPO3
7.6
|
Public Member Functions | |
__construct () | |
initialize () | |
getSpecifics () | |
clearCachedFieldInfo () | |
cacheFieldInfo () | |
exec_INSERTquery ($table, $fields_values, $no_quote_fields=false) | |
exec_INSERTmultipleRows ($table, array $fields, array $rows, $no_quote_fields=false) | |
exec_UPDATEquery ($table, $where, $fields_values, $no_quote_fields=false) | |
exec_DELETEquery ($table, $where) | |
exec_SELECTquery ($select_fields, $from_table, $where_clause, $groupBy= '', $orderBy= '', $limit= '') | |
exec_TRUNCATEquery ($table) | |
INSERTquery ($table, $fields_values, $no_quote_fields=false) | |
INSERTmultipleRows ($table, array $fields, array $rows, $no_quote_fields=false) | |
UPDATEquery ($table, $where, $fields_values, $no_quote_fields=false) | |
DELETEquery ($table, $where) | |
SELECTquery ($select_fields, $from_table, $where_clause, $groupBy= '', $orderBy= '', $limit= '') | |
TRUNCATEquery ($table) | |
prepare_SELECTquery ($select_fields, $from_table, $where_clause, $groupBy= '', $orderBy= '', $limit= '', array $input_parameters=array()) | |
quoteFieldNames ($select_fields) | |
quoteFromTables ($from_table) | |
quoteWhereClause ($where_clause) | |
fullQuoteStr ($str, $table, $allowNull=false) | |
quoteStr ($str, $table) | |
quoteName ($name, $handlerKey=null, $useBackticks=false) | |
MetaType ($type, $table, $maxLength=-1) | |
getMetadata ($type, $table, $field, $maxLength=-1) | |
MySQLMetaType ($t) | |
MySQLActualType ($meta) | |
getEquivalentIndexDefinition ($indexSQL) | |
getEquivalentFieldDefinition ($fieldSQL) | |
sql_error () | |
sql_errno () | |
sql_num_rows ($res) | |
sql_fetch_assoc ($res) | |
sql_fetch_row ($res) | |
sql_free_result ($res) | |
sql_insert_id () | |
sql_affected_rows () | |
sql_data_seek ($res, $seek) | |
sql_field_metatype ($table, $field) | |
sql_field_type ($res, $pointer) | |
sql_query ($query) | |
sql_pconnect () | |
sql_select_db () | |
admin_get_tables () | |
admin_query ($query) | |
handler_getFromTableList ($tableList) | |
handler_init ($handlerKey) | |
isConnected () | |
runningNative () | |
runningADOdbDriver ($driver) | |
getServerVersion () | |
debugHandler ($function, $execTime, $inData) | |
debug_WHERE ($table, $where, $script= '') | |
debug_log ($query, $ms, $data, $join, $errorFlag, $script= '') | |
debug_explain ($query) | |
Public Member Functions inherited from DatabaseConnection | |
initialize () | |
exec_SELECT_mm_query ($select, $local_table, $mm_table, $foreign_table, $whereClause= '', $groupBy= '', $orderBy= '', $limit= '') | |
exec_SELECT_queryArray ($queryParts) | |
exec_SELECTgetRows ($select_fields, $from_table, $where_clause, $groupBy= '', $orderBy= '', $limit= '', $uidIndexField= '') | |
exec_SELECTgetSingleRow ($select_fields, $from_table, $where_clause, $groupBy= '', $orderBy= '', $numIndex=false) | |
exec_SELECTcountRows ($field, $table, $where= '1=1') | |
INSERTquery ($table, $fields_values, $no_quote_fields=false) | |
SELECTsubquery ($select_fields, $from_table, $where_clause) | |
SELECT_mm_query ($select, $local_table, $mm_table, $foreign_table, $whereClause= '', $groupBy= '', $orderBy= '', $limit= '') | |
listQuery ($field, $value, $table) | |
searchQuery ($searchWords, $fields, $table, $constraint=self::AND_Constraint) | |
prepare_SELECTqueryArray (array $queryParts, array $input_parameters=array()) | |
prepare_PREPAREDquery ($query, array $queryComponents) | |
fullQuoteStr ($str, $table, $allowNull=false) | |
fullQuoteArray ($arr, $table, $noQuote=false, $allowNull=false) | |
quoteStr ($str, $table) | |
escapeStrForLike ($str, $table) | |
cleanIntArray ($arr) | |
cleanIntList ($list) | |
stripOrderBy ($str) | |
stripGroupBy ($str) | |
splitGroupOrderLimit ($str) | |
getDateTimeFormats ($table) | |
sql_query ($query) | |
sql_error () | |
sql_errno () | |
sql_num_rows ($res) | |
sql_fetch_assoc ($res) | |
sql_fetch_row ($res) | |
sql_free_result ($res) | |
sql_insert_id () | |
sql_affected_rows () | |
sql_data_seek ($res, $seek) | |
sql_field_type ($res, $pointer) | |
sql_pconnect () | |
sql_select_db () | |
admin_get_dbs () | |
admin_get_tables () | |
admin_get_fields ($tableName) | |
admin_get_keys ($tableName) | |
admin_get_charsets () | |
admin_query ($query) | |
setDatabaseHost ($host= 'localhost') | |
setDatabasePort ($port=3306) | |
setDatabaseSocket ($socket=null) | |
setDatabaseName ($name) | |
setDatabaseUsername ($username) | |
setDatabasePassword ($password) | |
setPersistentDatabaseConnection ($persistentDatabaseConnection) | |
setConnectionCompression ($connectionCompression) | |
setInitializeCommandsAfterConnect (array $commands) | |
setConnectionCharset ($connectionCharset= 'utf8') | |
connectDB () | |
isConnected () | |
getDatabaseHandle () | |
setDatabaseHandle ($handle) | |
getServerVersion () | |
debug ($func, $query= '') | |
debug_check_recordset ($res) | |
__sleep () | |
Public Attributes | |
$debug = false | |
$conf = array() | |
$mapping = array() | |
$handlerCfg | |
$handlerInstance = array() | |
$lastHandlerKey = '' | |
$cache_autoIncFields = array() | |
$cache_fieldType = array() | |
$cache_primaryKeys = array() | |
$SQLparser | |
Public Attributes inherited from DatabaseConnection | |
const | AND_Constraint = 'AND' |
const | OR_Constraint = 'OR' |
$debugOutput = false | |
$debug_lastBuiltQuery = '' | |
$store_lastBuiltQuery = false | |
$explainOutput = 0 | |
$default_charset = 'utf8' | |
Protected Member Functions | |
getFieldInfoCache () | |
analyzeCachingTables () | |
analyzeExtensionTables () | |
parseAndAnalyzeSql ($sql) | |
getCompleteFieldInformation () | |
getCacheableString (array $fieldInformation) | |
analyzeFields ($parsedExtSQL) | |
mapCachedFieldInfo (array $fieldInfo) | |
exec_query (array $queryParts) | |
query ($query) | |
SELECTqueryFromArray (array $params) | |
compileSelectParameters (array $params) | |
getQueryComponents ($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit) | |
precompileSELECTquery (array $components) | |
quoteSELECTsubquery (array $components) | |
_quoteFieldNames (array $select_fields) | |
_quoteFromTables (array $from_table) | |
_quoteWhereClause (array $where_clause) | |
quoteGroupBy ($groupBy) | |
_quoteGroupBy (array $groupBy) | |
quoteOrderBy ($orderBy) | |
_quoteOrderBy (array $orderBy) | |
updateLastInsertId ($table, array $fieldValues) | |
determineHandlerType ($res) | |
map_needMapping ($tableList, $fieldMappingOnly=false, array &$parsedTableList=array()) | |
map_assocArray ($input, $tables, $rev=false) | |
map_remapSELECTQueryParts ($select_fields, $from_table, $where_clause, $groupBy, $orderBy) | |
getMappingKey ($tableName) | |
getFreeMappingKey ($tableName) | |
map_sqlParts (&$sqlPartArray, $defaultTable) | |
map_subquery (&$parsedQuery) | |
map_genericQueryParsed (&$parsedQuery) | |
map_fieldNamesInArray ($table, &$fieldArray) | |
Protected Member Functions inherited from DatabaseConnection | |
query ($query) | |
getSelectMmQueryParts ($select, $local_table, $mm_table, $foreign_table, $whereClause= '', $groupBy= '', $orderBy= '', $limit= '') | |
checkConnectionCharset () | |
disconnectIfConnected () | |
explain ($query, $from_table, $row_count) | |
Protected Attributes | |
$printErrors = false | |
$table2handlerKeys = array() | |
$lastQuery = '' | |
$lastParsedAndMappedQueryArray = array() | |
$resourceIdToTableNameMap = array() | |
$cache_handlerKeyFromTableList = array() | |
$cache_mappingFromTableList = array() | |
$cacheIdentifier = 'DatabaseConnection_fieldInfo' | |
$installerSql = null | |
$queryCache | |
$mysqlDataTypeMapping | |
$dbmsSpecifics | |
Protected Attributes inherited from DatabaseConnection | |
$databaseHost = '' | |
$databasePort = 3306 | |
$databaseSocket = null | |
$databaseName = '' | |
$databaseUsername = '' | |
$databaseUserPassword = '' | |
$persistentDatabaseConnection = false | |
$connectionCompression = false | |
$connectionCharset = 'utf8' | |
$initializeCommandsAfterConnect = array() | |
$isConnected = false | |
$link = null | |
$preProcessHookObjects = array() | |
$postProcessHookObjects = array() | |
Additional Inherited Members | |
Static Protected Attributes inherited from DatabaseConnection | |
static | $dateTimeFormats |
TYPO3 database abstraction layer
Definition at line 22 of file dbal/Classes/Database/DatabaseConnection.php.
__construct | ( | ) |
Constructor. Creates SQL parser object and imports configuration from $TYPO3_CONF_VARS['EXTCONF']['dbal']
Definition at line 210 of file dbal/Classes/Database/DatabaseConnection.php.
References $GLOBALS, and GeneralUtility\makeInstance().
|
protected |
Quotes field (and table) names in a SQL SELECT clause according to DB rules
array | $select_fields | The parsed fields to quote |
Definition at line 1655 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteWhereClause(), DatabaseConnection\quoteFieldNames(), and DatabaseConnection\quoteName().
Referenced by DatabaseConnection\prepare_SELECTquery(), DatabaseConnection\quoteFieldNames(), DatabaseConnection\quoteSELECTsubquery(), and DatabaseConnection\SELECTqueryFromArray().
|
protected |
Quotes table names in a SQL FROM clause according to DB rules
array | $from_table | The parsed FROM clause to quote |
Definition at line 1712 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\quoteName().
Referenced by DatabaseConnection\prepare_SELECTquery(), DatabaseConnection\quoteFromTables(), DatabaseConnection\quoteSELECTsubquery(), and DatabaseConnection\SELECTqueryFromArray().
|
protected |
Quotes field names in a SQL GROUP BY clause according to DB rules
array | $groupBy | The parsed GROUP BY clause to quote |
Definition at line 1883 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\quoteName().
Referenced by DatabaseConnection\prepare_SELECTquery(), DatabaseConnection\quoteGroupBy(), and DatabaseConnection\SELECTqueryFromArray().
|
protected |
Quotes field names in a SQL ORDER BY clause according to DB rules
array | $orderBy | The parsed ORDER BY clause to quote |
Definition at line 1921 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\quoteName().
Referenced by DatabaseConnection\prepare_SELECTquery(), DatabaseConnection\quoteOrderBy(), and DatabaseConnection\SELECTqueryFromArray().
|
protected |
Quotes field names in a SQL WHERE clause according to DB rules
array | $where_clause | The parsed WHERE clause to quote |
Definition at line 1764 of file dbal/Classes/Database/DatabaseConnection.php.
References elseif, DatabaseConnection\escapeStrForLike(), GeneralUtility\inList(), DatabaseConnection\quoteFieldNames(), DatabaseConnection\quoteName(), DatabaseConnection\quoteSELECTsubquery(), and DatabaseConnection\runningADOdbDriver().
Referenced by DatabaseConnection\_quoteFieldNames(), DatabaseConnection\prepare_SELECTquery(), DatabaseConnection\quoteSELECTsubquery(), DatabaseConnection\quoteWhereClause(), and DatabaseConnection\SELECTqueryFromArray().
admin_get_tables | ( | ) |
Returns the list of tables from the default database, TYPO3_db (quering the DBMS) In a DBAL this method should 1) look up all tables from the DBMS of the _DEFAULT handler and then 2) add all tables configured to be managed by other handlers
Definition at line 2730 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\query(), DatabaseConnection\sql_error(), and DatabaseConnection\sql_fetch_assoc().
admin_query | ( | $query | ) |
mysqli() wrapper function, used by the Install Tool and EM for all queries regarding management of the database!
string | $query | Query to execute |
\InvalidArgumentException |
Definition at line 2987 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\clearCachedFieldInfo(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_TRUNCATEquery(), DatabaseConnection\handler_getFromTableList(), DatabaseConnection\map_genericQueryParsed(), and DatabaseConnection\query().
|
protected |
Loop through caching configurations to find the usage of database backends and parse and analyze table definitions
Definition at line 316 of file dbal/Classes/Database/DatabaseConnection.php.
References GeneralUtility\makeInstance(), and DatabaseConnection\parseAndAnalyzeSql().
Referenced by DatabaseConnection\cacheFieldInfo().
|
protected |
Loop over all installed extensions parse and analyze table definitions (if any)
Definition at line 328 of file dbal/Classes/Database/DatabaseConnection.php.
References $GLOBALS, and DatabaseConnection\parseAndAnalyzeSql().
Referenced by DatabaseConnection\cacheFieldInfo().
|
protected |
Analyzes fields and adds the extracted information to the field type, auto increment and primary key info caches.
array | $parsedExtSQL | The output produced by ->getFieldDefinitions_fileContent() |
Definition at line 386 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\parseAndAnalyzeSql().
cacheFieldInfo | ( | ) |
Caches the field information.
Definition at line 291 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\analyzeCachingTables(), DatabaseConnection\analyzeExtensionTables(), DatabaseConnection\getCacheableString(), DatabaseConnection\getCompleteFieldInformation(), and DatabaseConnection\getFieldInfoCache().
Referenced by DatabaseConnection\initialize().
clearCachedFieldInfo | ( | ) |
Clears the cached field information file.
Definition at line 281 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\getFieldInfoCache().
Referenced by DatabaseConnection\admin_query().
|
protected |
Compiles and returns an array of SELECTquery parameters (without $limit) to be used with SELECTquery() or exec_SELECTquery().
array | $params |
Definition at line 1318 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\exec_SELECTquery(), and DatabaseConnection\SELECTqueryFromArray().
debug_explain | ( | $query | ) |
Perform EXPLAIN query on DEFAULT handler!
string | $query | SELECT Query |
Definition at line 4009 of file dbal/Classes/Database/DatabaseConnection.php.
debug_log | ( | $query, | |
$ms, | |||
$data, | |||
$join, | |||
$errorFlag, | |||
$script = '' |
|||
) |
Inserts row in the log table
string | $query | The current query |
int | $ms | Execution time of query in milliseconds |
array | $data | Data to be stored serialized. |
string | $join | Join string if there IS a join. |
int | $errorFlag | Error status. |
string | $script | The script calling the logging |
Definition at line 3977 of file dbal/Classes/Database/DatabaseConnection.php.
References $GLOBALS.
debug_WHERE | ( | $table, | |
$where, | |||
$script = '' |
|||
) |
Logs the where clause for debugging purposes.
string | $table | Table name(s) the query was targeted at |
string | $where | The WHERE clause to be logged |
string | $script | The script calling the logging |
Definition at line 3954 of file dbal/Classes/Database/DatabaseConnection.php.
References $GLOBALS.
debugHandler | ( | $function, | |
$execTime, | |||
$inData | |||
) |
Debug handler for query execution
string | $function | Function name from which this function is called. |
string | $execTime | Execution time in ms of the query |
array | $inData | In-data of various kinds. |
Definition at line 3859 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\exec_DELETEquery(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_SELECTquery(), DatabaseConnection\exec_TRUNCATEquery(), DatabaseConnection\exec_UPDATEquery(), and DatabaseConnection\prepare_SELECTquery().
DELETEquery | ( | $table, | |
$where | |||
) |
Creates a DELETE SQL-statement for $table where $where-clause
string | $table | See exec_DELETEquery() |
string | $where | See exec_DELETEquery() |
\InvalidArgumentException |
Definition at line 1218 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\quoteFromTables(), and DatabaseConnection\quoteWhereClause().
Referenced by DatabaseConnection\exec_DELETEquery().
|
protected |
Determine handler type by result set
bool | \mysqli_result | object | $res | MySQLi result set / DBAL Object |
Definition at line 2434 of file dbal/Classes/Database/DatabaseConnection.php.
References elseif.
Referenced by DatabaseConnection\sql_data_seek(), DatabaseConnection\sql_fetch_assoc(), DatabaseConnection\sql_fetch_row(), DatabaseConnection\sql_field_type(), DatabaseConnection\sql_free_result(), and DatabaseConnection\sql_num_rows().
exec_DELETEquery | ( | $table, | |
$where | |||
) |
Creates and executes a DELETE SQL-statement for $table where $where-clause
string | $table | Database tablename |
string | $where | WHERE clause, eg. "uid=1". NOTICE: You must escape values in this argument with $this->fullQuoteStr() yourself! |
Definition at line 733 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\debug(), DatabaseConnection\debugHandler(), DatabaseConnection\DELETEquery(), DatabaseConnection\handler_getFromTableList(), DatabaseConnection\map_needMapping(), DatabaseConnection\map_sqlParts(), GeneralUtility\milliseconds(), DatabaseConnection\query(), and DatabaseConnection\sql_error().
Referenced by DatabaseConnection\exec_query().
exec_INSERTmultipleRows | ( | $table, | |
array | $fields, | ||
array | $rows, | ||
$no_quote_fields = false |
|||
) |
Creates and executes an INSERT SQL-statement for $table with multiple rows.
string | $table | Table name |
array | $fields | Field names |
array | $rows | Table rows. Each row should be an array with field values mapping to $fields |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
Definition at line 618 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\exec_INSERTquery(), DatabaseConnection\handler_getFromTableList(), and DatabaseConnection\query().
exec_INSERTquery | ( | $table, | |
$fields_values, | |||
$no_quote_fields = false |
|||
) |
Creates and executes an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. Using this function specifically allows us to handle BLOB and CLOB fields depending on DB
string | $table | Table name |
array | $fields_values | Field values as key=>value pairs. Values will be escaped internally. Typically you would fill an array like "$insertFields" with 'fieldname'=>'value' and pass it to this function as argument. |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
\RuntimeException | Creates and executes an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. Using this function specifically allows us to handle BLOB and CLOB fields depending on DB |
string | $table | Table name |
array | $fields_values | Field values as key=>value pairs. Values will be escaped internally. Typically you would fill an array like "$insertFields" with 'fieldname'=>'value' and pass it to this function as argument. |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
Definition at line 485 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\debug(), DatabaseConnection\debugHandler(), elseif, DatabaseConnection\fullQuoteStr(), DatabaseConnection\handler_getFromTableList(), DatabaseConnection\INSERTquery(), DatabaseConnection\map_assocArray(), DatabaseConnection\map_needMapping(), GeneralUtility\milliseconds(), DatabaseConnection\query(), DatabaseConnection\quoteFromTables(), DatabaseConnection\quoteWhereClause(), DatabaseConnection\sql_error(), DatabaseConnection\sql_insert_id(), and DatabaseConnection\updateLastInsertId().
Referenced by DatabaseConnection\admin_query(), DatabaseConnection\exec_INSERTmultipleRows(), and DatabaseConnection\exec_query().
|
protected |
Executes a query. EXPERIMENTAL since TYPO3 4.4.
array | $queryParts | SQL parsed by method parseSQL() of |
Definition at line 948 of file dbal/Classes/Database/DatabaseConnection.php.
References $GLOBALS, DatabaseConnection\exec_DELETEquery(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_SELECTquery(), DatabaseConnection\exec_TRUNCATEquery(), and DatabaseConnection\exec_UPDATEquery().
Referenced by DatabaseConnection\sql_query().
exec_SELECTquery | ( | $select_fields, | |
$from_table, | |||
$where_clause, | |||
$groupBy = '' , |
|||
$orderBy = '' , |
|||
$limit = '' |
|||
) |
Creates and executes a SELECT SQL-statement Using this function specifically allow us to handle the LIMIT feature independently of DB.
string | $select_fields | List of fields to select from the table. This is what comes right after "SELECT ...". Required value. |
string | $from_table | Table(s) from which to select. This is what comes right after "FROM ...". Required value. |
string | $where_clause | Additional WHERE clauses put in the end of the query. NOTICE: You must escape values in this argument with $this->fullQuoteStr() yourself! DO NOT PUT IN GROUP BY, ORDER BY or LIMIT! |
string | $groupBy | Optional GROUP BY field(s), if none, supply blank string. |
string | $orderBy | Optional ORDER BY field(s), if none, supply blank string. |
string | $limit | Optional LIMIT value ([begin,]max), if none, supply blank string. |
\RuntimeException |
Creates and executes a SELECT SQL-statement Using this function specifically allow us to handle the LIMIT feature independently of DB.
string | $select_fields | List of fields to select from the table. This is what comes right after "SELECT ...". Required value. |
string | $from_table | Table(s) from which to select. This is what comes right after "FROM ...". Required value. |
string | $where_clause | Additional WHERE clauses put in the end of the query. NOTICE: You must escape values in this argument with $this->fullQuoteStr() yourself! DO NOT PUT IN GROUP BY, ORDER BY or LIMIT! |
string | $groupBy | Optional GROUP BY field(s), if none, supply blank string. |
string | $orderBy | Optional ORDER BY field(s), if none, supply blank string. |
string | $limit | Optional LIMIT value ([begin,]max), if none, supply blank string. |
Definition at line 795 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\compileSelectParameters(), DatabaseConnection\debug(), DatabaseConnection\debugHandler(), DatabaseConnection\handler_getFromTableList(), GeneralUtility\intExplode(), DatabaseConnection\map_needMapping(), DatabaseConnection\map_remapSELECTQueryParts(), GeneralUtility\milliseconds(), DatabaseConnection\query(), DatabaseConnection\SELECTquery(), DatabaseConnection\SELECTqueryFromArray(), DatabaseConnection\sql_error(), and DatabaseConnection\sql_num_rows().
Referenced by DatabaseConnection\exec_query().
exec_TRUNCATEquery | ( | $table | ) |
Truncates a table.
string | $table | Database tablename |
Definition at line 895 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\debug(), DatabaseConnection\debugHandler(), DatabaseConnection\handler_getFromTableList(), DatabaseConnection\map_needMapping(), GeneralUtility\milliseconds(), DatabaseConnection\query(), DatabaseConnection\sql_error(), and DatabaseConnection\TRUNCATEquery().
Referenced by DatabaseConnection\admin_query(), and DatabaseConnection\exec_query().
exec_UPDATEquery | ( | $table, | |
$where, | |||
$fields_values, | |||
$no_quote_fields = false |
|||
) |
Creates and executes an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values. Using this function specifically allow us to handle BLOB and CLOB fields depending on DB
string | $table | Database tablename |
string | $where | WHERE clause, eg. "uid=1". NOTICE: You must escape values in this argument with $this->fullQuoteStr() yourself! |
array | $fields_values | Field values as key=>value pairs. Values will be escaped internally. Typically you would fill an array like "$updateFields" with 'fieldname'=>'value' and pass it to this function as argument. |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
Definition at line 649 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\debug(), DatabaseConnection\debugHandler(), DatabaseConnection\fullQuoteStr(), DatabaseConnection\handler_getFromTableList(), DatabaseConnection\map_assocArray(), DatabaseConnection\map_needMapping(), DatabaseConnection\map_sqlParts(), GeneralUtility\milliseconds(), DatabaseConnection\query(), DatabaseConnection\quoteFromTables(), DatabaseConnection\quoteWhereClause(), DatabaseConnection\sql_error(), and DatabaseConnection\UPDATEquery().
Referenced by DatabaseConnection\exec_query().
fullQuoteStr | ( | $str, | |
$table, | |||
$allowNull = false |
|||
) |
Escaping and quoting values for SQL statements.
string | $str | Input string |
string | $table | Table name for which to quote string. Just enter the table that the field-value is selected from (and any DBAL will look up which handler to use and then how to quote the string!). |
bool | $allowNull | Whether to allow NULL values |
Definition at line 1949 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\quoteStr().
Referenced by DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_UPDATEquery(), DatabaseConnection\INSERTquery(), and DatabaseConnection\UPDATEquery().
|
protected |
Creates a PHP code representation of the array that can be cached in the PHP code cache.
array | $fieldInformation |
Definition at line 372 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\cacheFieldInfo().
|
protected |
Returns all field information gathered during analyzing all tables and fields.
Definition at line 360 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\cacheFieldInfo().
getEquivalentFieldDefinition | ( | $fieldSQL | ) |
Convert the native MySQL Field type to the closest matching equivalent field type supported by the DBMS. INTEGER and TINYTEXT colums need to be further processed due to MySQL limitations / non-standard features.
string | $fieldSQL |
Definition at line 2160 of file dbal/Classes/Database/DatabaseConnection.php.
getEquivalentIndexDefinition | ( | $indexSQL | ) |
Remove the index prefix length information from columns in an index definition. Partial indexes based on a prefix are not supported by all databases.
string | $indexSQL |
Definition at line 2136 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 271 of file dbal/Classes/Database/DatabaseConnection.php.
References GeneralUtility\makeInstance().
Referenced by DatabaseConnection\cacheFieldInfo(), and DatabaseConnection\clearCachedFieldInfo().
|
protected |
Returns a free key to be used to store mapping information in $this->mapping.
string | $tableName |
Definition at line 3514 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Returns the key to be used when retrieving information from $this->mapping. This ensures that mapping from aliased tables is properly retrieved.
string | $tableName |
Definition at line 3499 of file dbal/Classes/Database/DatabaseConnection.php.
getMetadata | ( | $type, | |
$table, | |||
$field, | |||
$maxLength = -1 |
|||
) |
Return Metadata for native field type (ADOdb only!)
string | $type | Native type as reported by admin_get_fields() |
string | $table | Table name for which the type is queried. Important for detection of DBMS handler of the query! |
string | $field | Field name for which the type is queried. Important for accessing the field information cache. |
int | $maxLength |
\RuntimeException |
Definition at line 2048 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\handler_getFromTableList(), and DatabaseConnection\quoteFromTables().
Referenced by DatabaseConnection\MetaType().
|
protected |
Returns the parsed query components.
string | $select_fields | |
string | $from_table | |
string | $where_clause | |
string | $groupBy | |
string | $orderBy | |
string | $limit |
\InvalidArgumentException |
Definition at line 1457 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\handler_getFromTableList(), GeneralUtility\intExplode(), and DatabaseConnection\runningADOdbDriver().
Referenced by DatabaseConnection\prepare_SELECTquery().
getServerVersion | ( | ) |
Get the SQL server version
Definition at line 3287 of file dbal/Classes/Database/DatabaseConnection.php.
getSpecifics | ( | ) |
Gets the DBMS specifics object
Definition at line 263 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$dbmsSpecifics.
handler_getFromTableList | ( | $tableList | ) |
Return the handler key pointing to an appropriate database handler as found in $this->handlerCfg array Notice: TWO or more tables in the table list MUST use the SAME handler key - otherwise a fatal error is thrown! (Logically, no database can possibly join two tables from separate sources!)
string | $tableList | Table list, eg. "pages" or "pages, tt_content" or "pages AS A, tt_content AS B |
\RuntimeException |
Definition at line 3067 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\handler_init().
Referenced by DatabaseConnection\admin_query(), DatabaseConnection\exec_DELETEquery(), DatabaseConnection\exec_INSERTmultipleRows(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_SELECTquery(), DatabaseConnection\exec_TRUNCATEquery(), DatabaseConnection\exec_UPDATEquery(), DatabaseConnection\getMetadata(), DatabaseConnection\getQueryComponents(), DatabaseConnection\INSERTquery(), DatabaseConnection\precompileSELECTquery(), DatabaseConnection\quoteStr(), DatabaseConnection\SELECTquery(), and DatabaseConnection\UPDATEquery().
handler_init | ( | $handlerKey | ) |
Initialize handler (connecting to database)
string | $handlerKey | Handler key |
\RuntimeException |
Definition at line 3107 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$databaseHost, DatabaseConnection\$databaseName, DatabaseConnection\$databaseUsername, DatabaseConnection\$databaseUserPassword, $GLOBALS, DatabaseConnection\$link, DatabaseConnection\checkConnectionCharset(), DatabaseConnection\isConnected(), DatabaseConnection\query(), DatabaseConnection\sql_error(), GeneralUtility\SYSLOG_SEVERITY_ERROR, and GeneralUtility\SYSLOG_SEVERITY_FATAL.
Referenced by DatabaseConnection\handler_getFromTableList(), and DatabaseConnection\sql_pconnect().
initialize | ( | ) |
Initialize the database connection
Definition at line 225 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\cacheFieldInfo(), DatabaseConnection\debug(), and GeneralUtility\makeInstance().
INSERTmultipleRows | ( | $table, | |
array | $fields, | ||
array | $rows, | ||
$no_quote_fields = false |
|||
) |
Creates an INSERT SQL-statement for $table with multiple rows.
string | $table | Table name |
array | $fields | Field names |
array | $rows | Table rows. Each row should be an array with field values mapping to $fields |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
Creates an INSERT SQL-statement for $table with multiple rows.
string | $table | Table name |
array | $fields | Field names |
array | $rows | Table rows. Each row should be an array with field values mapping to $fields |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
Definition at line 1105 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\INSERTquery().
INSERTquery | ( | $table, | |
$fields_values, | |||
$no_quote_fields = false |
|||
) |
Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values.
string | $table | See exec_INSERTquery() |
array | $fields_values | See exec_INSERTquery() |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
Definition at line 1022 of file dbal/Classes/Database/DatabaseConnection.php.
References elseif, DatabaseConnection\fullQuoteStr(), DatabaseConnection\handler_getFromTableList(), DatabaseConnection\quoteFieldNames(), DatabaseConnection\quoteFromTables(), DatabaseConnection\quoteStr(), DatabaseConnection\runningNative(), and DatabaseConnection\sql_field_metatype().
Referenced by DatabaseConnection\exec_INSERTquery(), and DatabaseConnection\INSERTmultipleRows().
isConnected | ( | ) |
Checks if database is connected.
Definition at line 3245 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\handler_init(), DatabaseConnection\query(), DatabaseConnection\quoteStr(), and DatabaseConnection\sql_query().
|
protected |
Takes an associated array with field => value pairs and remaps the field names if configured for this table in $this->mapping array. Be careful not to map a field name to another existing fields name (although you can use this to swap fieldnames of course...:-) Observe mapping problems with join-results (more than one table): Joined queries should always prefix the table name to avoid problems with this. Observe that alias fields are not mapped of course (should not be a problem though)
array | $input | Input array, associative keys |
array | $tables | Array of tables from the query. Normally just one table; many tables in case of a join. NOTICE: for multiple tables (with joins) there MIGHT occur trouble with fields of the same name in the two tables: This function traverses the mapping information for BOTH tables and applies mapping without checking from which table the field really came! |
bool | $rev | If TRUE, reverse direction. Default direction is to map an array going INTO the database (thus mapping TYPO3 fieldnames to PHYSICAL field names!) |
Definition at line 3368 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_UPDATEquery(), and DatabaseConnection\sql_fetch_assoc().
|
protected |
Re-mapping field names in array
string | $table | (TYPO3) Table name for fields. |
array | $fieldArray | Array of fieldnames to remap. Notice: Passed by reference! |
Definition at line 3788 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Will do table/field mapping on a general -compliant SQL query (May still not support all query types...)
array | $parsedQuery | Parsed QUERY as from ::parseSQL(). NOTICE: Passed by reference! |
\InvalidArgumentException |
Definition at line 3728 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\admin_query().
|
protected |
Checks if mapping is needed for a table(list)
string | $tableList | List of tables in query |
bool | $fieldMappingOnly | If TRUE, it will check only if FIELDs are configured and ignore the mapped table name if any. |
array | $parsedTableList | Parsed list of tables, should be passed as reference to be reused and prevent double parsing |
Definition at line 3318 of file dbal/Classes/Database/DatabaseConnection.php.
References elseif.
Referenced by DatabaseConnection\exec_DELETEquery(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_SELECTquery(), DatabaseConnection\exec_TRUNCATEquery(), DatabaseConnection\exec_UPDATEquery(), DatabaseConnection\prepare_SELECTquery(), and DatabaseConnection\sql_fetch_assoc().
|
protected |
Remaps table/field names in a SELECT query's parts
mixed | $select_fields | Either parsed list of tables (SQLparser->parseFromTables()) or list of fields to select from the table. This is what comes right after "SELECT ...". Required value. |
string | $from_table | Table(s) from which to select. This is what comes right after "FROM ...". Require value. |
string | $where_clause | Where clause. This is what comes right after "WHERE ...". Can be blank. |
string | $groupBy | Group by field(s) |
string | $orderBy | Order by field(s) |
Definition at line 3411 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\exec_SELECTquery(), and DatabaseConnection\prepare_SELECTquery().
|
protected |
Generic mapping of table/field names arrays (as parsed by )
array | $sqlPartArray | Array with parsed SQL parts; Takes both fields, tables, where-parts, group and order-by. Passed by reference. |
string | $defaultTable | Default table name to assume if no table is found in $sqlPartArray |
Definition at line 3530 of file dbal/Classes/Database/DatabaseConnection.php.
References elseif.
Referenced by DatabaseConnection\exec_DELETEquery(), and DatabaseConnection\exec_UPDATEquery().
|
protected |
Maps table and field names in a subquery.
array | $parsedQuery |
Definition at line 3689 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
This function builds all definitions for mapped tables and fields
array | $fieldInfo |
Definition at line 426 of file dbal/Classes/Database/DatabaseConnection.php.
References $GLOBALS.
MetaType | ( | $type, | |
$table, | |||
$maxLength = -1 |
|||
) |
Return MetaType for native field type (ADOdb only!)
string | $type | Native type as reported by admin_get_fields() |
string | $table | Table name for which query type string. Important for detection of DBMS handler of the query! |
int | $maxLength |
\RuntimeException |
Definition at line 2032 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\getMetadata(), and GeneralUtility\logDeprecatedFunction().
MySQLActualType | ( | $meta | ) |
Return actual MySQL type for meta field type
string | $meta | Meta type (currenly ADOdb syntax only, http://phplens.com/lens/adodb/docs-adodb.htm#metatype) |
Definition at line 2093 of file dbal/Classes/Database/DatabaseConnection.php.
References GeneralUtility\logDeprecatedFunction().
MySQLMetaType | ( | $t | ) |
Return MetaType for native MySQL field type
string | $t | native type as reported as in mysqldump files |
Definition at line 2080 of file dbal/Classes/Database/DatabaseConnection.php.
References GeneralUtility\logDeprecatedFunction().
|
protected |
Parse and analyze given SQL string
$sql |
Definition at line 348 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\analyzeFields().
Referenced by DatabaseConnection\analyzeCachingTables(), and DatabaseConnection\analyzeExtensionTables().
|
protected |
Precompiles a SELECT prepared SQL statement.
array | $components |
Definition at line 1503 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\handler_getFromTableList().
Referenced by DatabaseConnection\prepare_SELECTquery().
prepare_SELECTquery | ( | $select_fields, | |
$from_table, | |||
$where_clause, | |||
$groupBy = '' , |
|||
$orderBy = '' , |
|||
$limit = '' , |
|||
array | $input_parameters = array() |
||
) |
Creates a SELECT prepared SQL statement.
string | $select_fields | See exec_SELECTquery() |
string | $from_table | See exec_SELECTquery() |
string | $where_clause | See exec_SELECTquery() |
string | $groupBy | See exec_SELECTquery() |
string | $orderBy | See exec_SELECTquery() |
string | $limit | See exec_SELECTquery() |
array | $input_parameters | An array of values with as many elements as there are bound parameters in the SQL statement being executed. All values are treated as ::PARAM_AUTOTYPE. |
Definition at line 1365 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteFieldNames(), DatabaseConnection\_quoteFromTables(), DatabaseConnection\_quoteGroupBy(), DatabaseConnection\_quoteOrderBy(), DatabaseConnection\_quoteWhereClause(), DatabaseConnection\debug(), DatabaseConnection\debugHandler(), GeneralUtility\devLog(), DatabaseConnection\getQueryComponents(), GeneralUtility\makeInstance(), DatabaseConnection\map_needMapping(), DatabaseConnection\map_remapSELECTQueryParts(), GeneralUtility\milliseconds(), DatabaseConnection\precompileSELECTquery(), and DatabaseConnection\runningNative().
|
protected |
Central query method. Also checks if there is a database connection. Use this to execute database queries instead of directly calling $this->link->query()
string | $query | The query to send to the database |
Definition at line 1001 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\connectDB(), and DatabaseConnection\isConnected().
Referenced by AdodbPreparedStatement\__construct(), DatabaseConnection\admin_get_tables(), DatabaseConnection\admin_query(), DatabaseConnection\exec_DELETEquery(), DatabaseConnection\exec_INSERTmultipleRows(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_SELECTquery(), DatabaseConnection\exec_TRUNCATEquery(), DatabaseConnection\exec_UPDATEquery(), and DatabaseConnection\handler_init().
quoteFieldNames | ( | $select_fields | ) |
Quotes field (and table) names with the quote character suitable for the DB being used
string | $select_fields | List of fields to be used in query to DB |
\InvalidArgumentException |
Definition at line 1632 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteFieldNames(), and DatabaseConnection\runningNative().
Referenced by DatabaseConnection\_quoteFieldNames(), DatabaseConnection\_quoteWhereClause(), DatabaseConnection\INSERTquery(), DatabaseConnection\SELECTquery(), and DatabaseConnection\UPDATEquery().
quoteFromTables | ( | $from_table | ) |
Quotes table names with the quote character suitable for the DB being used
string | $from_table | List of tables to be selected from DB |
Definition at line 1692 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteFromTables(), and DatabaseConnection\runningNative().
Referenced by DatabaseConnection\DELETEquery(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_UPDATEquery(), DatabaseConnection\getMetadata(), DatabaseConnection\INSERTquery(), DatabaseConnection\SELECTquery(), DatabaseConnection\TRUNCATEquery(), and DatabaseConnection\UPDATEquery().
|
protected |
Quotes the field (and table) names within a group by clause with the quote character suitable for the DB being used
string | $groupBy | A group by clause that can by parsed by parseFieldList |
Definition at line 1863 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteGroupBy(), and DatabaseConnection\runningNative().
Referenced by DatabaseConnection\SELECTquery().
quoteName | ( | $name, | |
$handlerKey = null , |
|||
$useBackticks = false |
|||
) |
Quotes an object name (table name, field, ...)
string | $name | Object's name |
string | $handlerKey | Handler key |
bool | $useBackticks | If method NameQuote() is not used, whether to use backticks instead of driver-specific quotes |
Definition at line 2006 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey.
Referenced by DatabaseConnection\_quoteFieldNames(), DatabaseConnection\_quoteFromTables(), DatabaseConnection\_quoteGroupBy(), DatabaseConnection\_quoteOrderBy(), and DatabaseConnection\_quoteWhereClause().
|
protected |
Quotes the field (and table) names within an order by clause with the quote character suitable for the DB being used
string | $orderBy | An order by clause that can by parsed by parseFieldList |
Definition at line 1901 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteOrderBy(), and DatabaseConnection\runningNative().
Referenced by DatabaseConnection\SELECTquery().
|
protected |
Quotes components of a SELECT subquery.
array | $components | Array of SQL query components |
Definition at line 1617 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteFieldNames(), DatabaseConnection\_quoteFromTables(), and DatabaseConnection\_quoteWhereClause().
Referenced by DatabaseConnection\_quoteWhereClause().
quoteStr | ( | $str, | |
$table | |||
) |
Substitution for PHP function "addslashes()" Use this function instead of the PHP addslashes() function when you build queries - this will prepare your code for DBAL. NOTICE: You must wrap the output of this function in SINGLE QUOTES to be DBAL compatible. Unless you have to apply the single quotes yourself you should rather use ->fullQuoteStr()!
string | $str | Input string |
string | $table | Table name for which to quote string. Just enter the table that the field-value is selected from (and any DBAL will look up which handler to use and then how to quote the string!). |
\RuntimeException |
Definition at line 1968 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, DatabaseConnection\connectDB(), DatabaseConnection\handler_getFromTableList(), and DatabaseConnection\isConnected().
Referenced by DatabaseConnection\fullQuoteStr(), DatabaseConnection\INSERTquery(), and DatabaseConnection\UPDATEquery().
quoteWhereClause | ( | $where_clause | ) |
Quotes the field (and table) names within a where clause with the quote character suitable for the DB being used
string | $where_clause | A where clause that can be parsed by parseWhereClause |
\InvalidArgumentException |
Definition at line 1742 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteWhereClause(), and DatabaseConnection\runningNative().
Referenced by DatabaseConnection\DELETEquery(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_UPDATEquery(), DatabaseConnection\SELECTquery(), and DatabaseConnection\UPDATEquery().
runningADOdbDriver | ( | $driver | ) |
Checks whether the ADOdb handler is running with a driver that contains the argument
string | $driver | Driver name, matched with strstr(). |
Definition at line 3277 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\_quoteWhereClause(), DatabaseConnection\getQueryComponents(), DatabaseConnection\SELECTquery(), DatabaseConnection\sql_fetch_assoc(), and DatabaseConnection\sql_fetch_row().
runningNative | ( | ) |
Checks whether the DBAL is currently inside an operation running on the "native" DB handler (i.e. MySQL)
Definition at line 3266 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\INSERTquery(), DatabaseConnection\prepare_SELECTquery(), DatabaseConnection\quoteFieldNames(), DatabaseConnection\quoteFromTables(), DatabaseConnection\quoteGroupBy(), DatabaseConnection\quoteOrderBy(), DatabaseConnection\quoteWhereClause(), and DatabaseConnection\UPDATEquery().
SELECTquery | ( | $select_fields, | |
$from_table, | |||
$where_clause, | |||
$groupBy = '' , |
|||
$orderBy = '' , |
|||
$limit = '' |
|||
) |
Creates a SELECT SQL-statement
string | $select_fields | See exec_SELECTquery() |
string | $from_table | See exec_SELECTquery() |
string | $where_clause | See exec_SELECTquery() |
string | $groupBy | See exec_SELECTquery() |
string | $orderBy | See exec_SELECTquery() |
string | $limit | See exec_SELECTquery() |
Definition at line 1247 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\handler_getFromTableList(), GeneralUtility\intExplode(), DatabaseConnection\quoteFieldNames(), DatabaseConnection\quoteFromTables(), DatabaseConnection\quoteGroupBy(), DatabaseConnection\quoteOrderBy(), DatabaseConnection\quoteWhereClause(), and DatabaseConnection\runningADOdbDriver().
Referenced by DatabaseConnection\exec_SELECTquery().
|
protected |
Creates a SELECT SQL-statement to be used with an ADOdb backend.
array | $params | parsed parameters: array($select_fields, $from_table, $where_clause, $groupBy, $orderBy) |
Definition at line 1282 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\_quoteFieldNames(), DatabaseConnection\_quoteFromTables(), DatabaseConnection\_quoteGroupBy(), DatabaseConnection\_quoteOrderBy(), DatabaseConnection\_quoteWhereClause(), and DatabaseConnection\compileSelectParameters().
Referenced by DatabaseConnection\exec_SELECTquery().
sql_affected_rows | ( | ) |
Returns the number of rows affected by the last INSERT, UPDATE or DELETE query
Definition at line 2473 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey.
sql_data_seek | ( | $res, | |
$seek | |||
) |
Move internal result pointer
bool | \mysqli_result | object | $res | MySQLi result object / DBAL object |
int | $seek | Seek result number. |
Definition at line 2497 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\determineHandlerType().
sql_errno | ( | ) |
Returns the error number on the last query() execution
Definition at line 2226 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey.
sql_error | ( | ) |
Returns the error status on the last query() execution
Definition at line 2204 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey.
Referenced by DatabaseConnection\admin_get_tables(), DatabaseConnection\exec_DELETEquery(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_SELECTquery(), DatabaseConnection\exec_TRUNCATEquery(), DatabaseConnection\exec_UPDATEquery(), DatabaseConnection\handler_init(), DatabaseConnection\sql_query(), and DatabaseConnection\sql_select_db().
sql_fetch_assoc | ( | $res | ) |
Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows. MySQLi fetch_assoc() wrapper function
bool | \mysqli_result | object | $res | MySQLi result object / DBAL object |
Definition at line 2277 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\determineHandlerType(), DatabaseConnection\map_assocArray(), DatabaseConnection\map_needMapping(), and DatabaseConnection\runningADOdbDriver().
Referenced by DatabaseConnection\admin_get_tables().
sql_fetch_row | ( | $res | ) |
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. The array contains the values in numerical indices. MySQLi fetch_row() wrapper function
bool | \mysqli_result | object | $res | MySQLi result object / DBAL object |
Definition at line 2347 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\determineHandlerType(), and DatabaseConnection\runningADOdbDriver().
sql_field_metatype | ( | $table, | |
$field | |||
) |
Get the type of the specified field in a result
If the first parameter is a string, it is used as table name for the lookup.
string | $table | MySQL result pointer (of SELECT query) / DBAL object / table name |
int | $field | Field index. In case of ADOdb a string (field name!) |
Definition at line 2523 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\INSERTquery(), and DatabaseConnection\UPDATEquery().
sql_field_type | ( | $res, | |
$pointer | |||
) |
Get the type of the specified field in a result mysql_field_type() wrapper function
bool | \mysqli_result | object | $res | MySQLi result object / DBAL object |
int | $pointer | Field index. |
Definition at line 2547 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\debug(), DatabaseConnection\determineHandlerType(), and elseif.
sql_free_result | ( | $res | ) |
Free result memory free_result() wrapper function
bool | \mysqli_result | object | $res | MySQLi result object / DBAL object |
Definition at line 2402 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\determineHandlerType().
sql_insert_id | ( | ) |
Get the ID generated from the previous INSERT operation
Definition at line 2451 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey.
Referenced by DatabaseConnection\exec_INSERTquery().
sql_num_rows | ( | $res | ) |
Returns the number of selected rows.
bool | \mysqli_result | object | $res | MySQLi result object / DBAL object |
Definition at line 2249 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\determineHandlerType().
Referenced by DatabaseConnection\exec_SELECTquery().
sql_pconnect | ( | ) |
Open a (persistent) connection to a MySQL server
Definition at line 2644 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\handler_init().
sql_query | ( | $query | ) |
Executes query
EXPERIMENTAL - This method will make its best to handle the query correctly but if it cannot, it will simply pass the query to DEFAULT handler.
You should use exec_* function from this class instead! If you don't, anything that does not use the _DEFAULT handler will probably break!
MySQLi query() wrapper function Beware: Use of this method should be avoided as it is experimentally supported by DBAL. You should consider using exec_SELECTquery() and similar methods instead.
string | $query | Query to execute |
Definition at line 2604 of file dbal/Classes/Database/DatabaseConnection.php.
References $GLOBALS, DatabaseConnection\connectDB(), DatabaseConnection\debug(), DatabaseConnection\exec_query(), GeneralUtility\inList(), DatabaseConnection\isConnected(), and DatabaseConnection\sql_error().
sql_select_db | ( | ) |
Select a SQL database
Definition at line 2654 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$databaseName, DatabaseConnection\$lastHandlerKey, DatabaseConnection\sql_error(), and GeneralUtility\SYSLOG_SEVERITY_FATAL.
TRUNCATEquery | ( | $table | ) |
Creates a TRUNCATE TABLE SQL-statement
string | $table | See exec_TRUNCATEquery() |
Definition at line 1334 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\quoteFromTables().
Referenced by DatabaseConnection\exec_TRUNCATEquery().
|
protected |
Update the id information for the last inserted record
string | $table | |
array | $fieldValues |
Definition at line 2106 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$lastHandlerKey, and elseif.
Referenced by DatabaseConnection\exec_INSERTquery().
UPDATEquery | ( | $table, | |
$where, | |||
$fields_values, | |||
$no_quote_fields = false |
|||
) |
Creates an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values.
string | $table | See exec_UPDATEquery() |
string | $where | See exec_UPDATEquery() |
array | $fields_values | See exec_UPDATEquery() |
bool | array | string | $no_quote_fields | See fullQuoteArray() |
\InvalidArgumentException |
Definition at line 1137 of file dbal/Classes/Database/DatabaseConnection.php.
References DatabaseConnection\$store_lastBuiltQuery, elseif, DatabaseConnection\fullQuoteStr(), DatabaseConnection\handler_getFromTableList(), DatabaseConnection\quoteFieldNames(), DatabaseConnection\quoteFromTables(), DatabaseConnection\quoteStr(), DatabaseConnection\quoteWhereClause(), DatabaseConnection\runningNative(), and DatabaseConnection\sql_field_metatype().
Referenced by DatabaseConnection\exec_UPDATEquery().
$cache_autoIncFields = array() |
Definition at line 128 of file dbal/Classes/Database/DatabaseConnection.php.
$cache_fieldType = array() |
Definition at line 133 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 117 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 122 of file dbal/Classes/Database/DatabaseConnection.php.
$cache_primaryKeys = array() |
Definition at line 138 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 143 of file dbal/Classes/Database/DatabaseConnection.php.
$conf = array() |
Definition at line 39 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 204 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\getSpecifics().
$debug = false |
Definition at line 33 of file dbal/Classes/Database/DatabaseConnection.php.
$handlerCfg |
Definition at line 57 of file dbal/Classes/Database/DatabaseConnection.php.
$handlerInstance = array() |
Definition at line 89 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 155 of file dbal/Classes/Database/DatabaseConnection.php.
$lastHandlerKey = '' |
Definition at line 95 of file dbal/Classes/Database/DatabaseConnection.php.
Referenced by DatabaseConnection\admin_query(), DatabaseConnection\exec_DELETEquery(), DatabaseConnection\exec_INSERTquery(), DatabaseConnection\exec_SELECTquery(), DatabaseConnection\exec_TRUNCATEquery(), DatabaseConnection\exec_UPDATEquery(), DatabaseConnection\getMetadata(), DatabaseConnection\query(), DatabaseConnection\quoteName(), DatabaseConnection\quoteStr(), DatabaseConnection\sql_affected_rows(), DatabaseConnection\sql_errno(), DatabaseConnection\sql_error(), DatabaseConnection\sql_insert_id(), DatabaseConnection\sql_select_db(), and DatabaseConnection\updateLastInsertId().
|
protected |
Definition at line 107 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 101 of file dbal/Classes/Database/DatabaseConnection.php.
$mapping = array() |
Definition at line 45 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 171 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 27 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 162 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 112 of file dbal/Classes/Database/DatabaseConnection.php.
$SQLparser |
Definition at line 150 of file dbal/Classes/Database/DatabaseConnection.php.
|
protected |
Definition at line 51 of file dbal/Classes/Database/DatabaseConnection.php.