*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
-/**
- * Contains a database abstraction layer class for TYPO3
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- * @author Karsten Dambekalns <karsten@typo3.org>
- * @author Xavier Perseguers <xavier@typo3.org>
- */
+
/**
* TYPO3 database abstraction layer
*
* @author Kasper Skårhøj <kasper@typo3.com>
* @author Karsten Dambekalns <k.dambekalns@fishfarm.de>
+ * @author Xavier Perseguers <xavier@typo3.org>
*/
class DatabaseConnection extends \TYPO3\CMS\Core\Database\DatabaseConnection {
*/
public $SQLparser;
- /**
- * Installer
- *
- * @var t3lib_install
- * @todo Define visibility
- */
- public $Installer;
-
/**
* @var \TYPO3\CMS\Install\Sql\SchemaMigrator
*/
public function __construct() {
// Set SQL parser object for internal use:
$this->SQLparser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\SqlParser');
- $this->Installer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('t3lib_install');
$this->installerSql = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Install\\Sql\\SchemaMigrator');
$this->queryCache = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->getCache('dbal');
// Set internal variables with configuration:
/**
* Analyzes fields and adds the extracted information to the field type, auto increment and primary key info caches.
*
- * @param array $parsedExtSQL The output produced by t3lib_install_Sql->getFieldDefinitions_fileContent()
+ * @param array $parsedExtSQL The output produced by \TYPO3\CMS\Install\Sql\SchemaMigrator->getFieldDefinitions_fileContent()
* @return void
- * @see t3lib_install_Sql->getFieldDefinitions_fileContent()
*/
protected function analyzeFields($parsedExtSQL) {
foreach ($parsedExtSQL as $table => $tdef) {
* Executes a query.
* EXPERIMENTAL since TYPO3 4.4.
*
- * @param array $queryParts SQL parsed by method parseSQL() of t3lib_sqlparser
+ * @param array $queryParts SQL parsed by method parseSQL() of \TYPO3\CMS\Core\Database\SqlParser
* @return pointer Result pointer / DBAL object
* @see self::sql_query()
*/
* @param string See exec_SELECTquery()
* @param string See exec_SELECTquery()
* @param string See exec_SELECTquery()
- * @param 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 t3lib_db_PreparedStatement::PARAM_AUTOTYPE.
+ * @param 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 \TYPO3\CMS\Core\Database\PreparedStatement::PARAM_AUTOTYPE.
* @return \TYPO3\CMS\Core\Database\PreparedStatement Prepared statement
*/
public function prepare_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '', array $input_parameters = array()) {
* @param string $query The query to execute
* @param array $queryComponents The components of the query to execute
* @return pointer MySQL result pointer / DBAL object
- * @access protected This method may only be called by t3lib_db_PreparedStatement
+ * @access protected This method may only be called by \TYPO3\CMS\Core\Database\PreparedStatement
*/
public function exec_PREPAREDquery($query, array $precompiledParts) {
if ($this->debug) {
// quoteStr that will be used for Oracle
$pattern = str_replace($where_clause[$k]['func']['str'][1], '\\' . $where_clause[$k]['func']['str'][1], $where_clause[$k]['func']['str'][0]);
// table is not really needed and may in fact be empty in real statements
- // but it's not overriden from t3lib_db at the moment...
+ // but it's not overriden from \TYPO3\CMS\Core\Database\DatabaseConnection at the moment...
$patternForLike = $this->escapeStrForLike($pattern, $where_clause[$k]['func']['table']);
$where_clause[$k]['func']['str_like'] = $patternForLike;
case 'IFNULL':
*
* @return array Tables in an array (tablename is in both key and value)
* @todo Should the check for Oracle Recycle Bin stuff be moved elsewhere?
- * @todo Should return table details in value! see t3lib_db::admin_get_tables()
+ * @todo Should return table details in value! see \TYPO3\CMS\Core\Database\DatabaseConnection::admin_get_tables()
*/
public function admin_get_tables() {
$whichTables = array();
$this->handlerInstance[$handlerKey] = array('handlerType' => 'native', 'link' => $link);
// If link succeeded:
if ($link) {
- // For default, set ->link (see t3lib_DB)
+ // For default, set ->link (see \TYPO3\CMS\Core\Database\DatabaseConnection)
if ($handlerKey == '_DEFAULT') {
$this->link = $link;
}
}
/**
- * Generic mapping of table/field names arrays (as parsed by t3lib_sqlparser)
+ * Generic mapping of table/field names arrays (as parsed by \TYPO3\CMS\Core\Database\SqlParser)
*
* @param array Array with parsed SQL parts; Takes both fields, tables, where-parts, group and order-by. Passed by reference.
* @param string Default table name to assume if no table is found in $sqlPartArray
}
/**
- * Will do table/field mapping on a general t3lib_sqlparser-compliant SQL query
+ * Will do table/field mapping on a general \TYPO3\CMS\Core\Database\SqlParser-compliant SQL query
* (May still not support all query types...)
*
- * @param array Parsed QUERY as from t3lib_sqlparser::parseSQL(). NOTICE: Passed by reference!
+ * @param array Parsed QUERY as from \TYPO3\CMS\Core\Database\SqlParser::parseSQL(). NOTICE: Passed by reference!
* @return void
- * @see t3lib_sqlparser::parseSQL()
+ * @see \TYPO3\CMS\Core\Database\SqlParser::parseSQL()
*/
protected function map_genericQueryParsed(&$parsedQuery) {
// Getting table - same for all: