Commit 05cf2cd1 authored by zYne's avatar zYne

Sqlite connection driver updated

parent c6bd1147
......@@ -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);
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment