1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Sqlite connection driver updated

This commit is contained in:
zYne 2006-10-31 12:54:58 +00:00
parent c6bd1147fe
commit 05cf2cd1b6
3 changed files with 44 additions and 3 deletions

View File

@ -33,7 +33,9 @@ class Doctrine_Connection_Mysql extends Doctrine_Connection_Common {
protected $driverName = 'Mysql';
/**
* the constructor
* @param PDO $pdo -- database handle
*
* @param Doctrine_Manager $manager
* @param PDO $pdo database handle
*/
public function __construct(Doctrine_Manager $manager,PDO $pdo) {
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);

View File

@ -33,7 +33,7 @@ class Doctrine_Connection_Oracle extends Doctrine_Connection {
protected $driverName = 'Oracle';
public function __construct() {
public function __construct(Doctrine_Manager $manager, PDO $pdo) {
$this->supported = array(
'sequences' => true,
'indexes' => true,
@ -62,6 +62,8 @@ class Doctrine_Connection_Oracle extends Doctrine_Connection {
$this->options['default_tablespace'] = false;
$this->options['default_text_field_length'] = 2000;
$this->options['result_prefetching'] = false;
parent::__construct($manager, $pdo);
}
/**
* Adds an driver-specific LIMIT clause to the query

View File

@ -32,6 +32,43 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common {
* @var string $driverName the name of this connection driver
*/
protected $driverName = 'Sqlite';
/**
* the constructor
*
* @param Doctrine_Manager $manager
* @param PDO $pdo database handle
*/
public function __construct(Doctrine_Manager $manager, PDO $pdo) {
$this->supported = array(
'sequences' => 'emulated',
'indexes' => true,
'affected_rows' => true,
'summary_functions' => true,
'order_by_text' => true,
'current_id' => 'emulated',
'limit_queries' => true,
'LOBs' => true,
'replace' => true,
'transactions' => true,
'savepoints' => false,
'sub_selects' => true,
'auto_increment' => true,
'primary_key' => true,
'result_introspection' => false, // not implemented
'prepared_statements' => 'emulated',
'identifier_quoting' => true,
'pattern_escaping' => false,
);
$this->options['base_transaction_name'] = '___php_MDB2_sqlite_auto_commit_off';
$this->options['fixed_float'] = 0;
$this->options['database_path'] = '';
$this->options['database_extension'] = '';
$this->options['server_version'] = '';
parent::__construct($manager, $pdo);
}
/**
* Set the transacton isolation level.
*
@ -42,7 +79,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common {
* SERIALIZABLE (prevents phantom reads)
* @return void
*/
function setTransactionIsolation($isolation) {
public function setTransactionIsolation($isolation) {
switch ($isolation) {
case 'READ UNCOMMITTED':
$isolation = 0;