1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Changed the PDO::query calls to Doctrine_Connection::execute calls for portable errors

This commit is contained in:
zYne 2006-12-30 00:28:24 +00:00
parent d9d4e8771b
commit eb1a96b0b6
6 changed files with 18 additions and 18 deletions

View File

@ -43,7 +43,7 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction
{
$query = 'SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* releaseSavePoint
@ -56,7 +56,7 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction
{
$query = 'RELEASE SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* rollbackSavePoint
@ -69,7 +69,7 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction
{
$query = 'ROLLBACK TO SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* Set the transacton isolation level.
@ -132,6 +132,6 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction
$query = 'SET TRANSACTION' . $rw . $wait .' ISOLATION LEVEL ' . $nativeIsolation;
$this->conn->getDbh()->query($query);
$this->conn->execute($query);
}
}

View File

@ -63,6 +63,6 @@ class Doctrine_Transaction_Mssql extends Doctrine_Transaction
$query = 'SET TRANSACTION ISOLATION LEVEL ' . $isolation;
$this->conn->getDbh()->query($query);
$this->conn->execute($query);
}
}

View File

@ -43,7 +43,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction
{
$query = 'SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* releaseSavePoint
@ -56,7 +56,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction
{
$query = 'RELEASE SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* rollbackSavePoint
@ -69,7 +69,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction
{
$query = 'ROLLBACK TO SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* Set the transacton isolation level.
@ -98,7 +98,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction
$query = 'SET SESSION TRANSACTION ISOLATION LEVEL ' . $isolation;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* getTransactionIsolation
@ -107,7 +107,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction
*/
public function getIsolation()
{
$ret = $this->conn->getDbh()->query('SELECT @@tx_isolation')->fetch(PDO::FETCH_NUM);
$ret = $this->conn->execute('SELECT @@tx_isolation')->fetch(PDO::FETCH_NUM);
return current($ret);
}
}

View File

@ -43,7 +43,7 @@ class Doctrine_Transaction_Oracle extends Doctrine_Transaction
{
$query = 'SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* releaseSavePoint
@ -68,7 +68,7 @@ class Doctrine_Transaction_Oracle extends Doctrine_Transaction
{
$query = 'ROLLBACK TO SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* Set the transacton isolation level.
@ -98,6 +98,6 @@ class Doctrine_Transaction_Oracle extends Doctrine_Transaction
}
$query = 'ALTER SESSION ISOLATION LEVEL ' . $isolation;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
}

View File

@ -44,7 +44,7 @@ class Doctrine_Transaction_Pgsql extends Doctrine_Transaction
{
$query = 'SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* releaseSavePoint
@ -57,7 +57,7 @@ class Doctrine_Transaction_Pgsql extends Doctrine_Transaction
{
$query = 'RELEASE SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* rollbackSavePoint
@ -70,7 +70,7 @@ class Doctrine_Transaction_Pgsql extends Doctrine_Transaction
{
$query = 'ROLLBACK TO SAVEPOINT '.$savepoint;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
/**
* Set the transacton isolation level.
@ -97,6 +97,6 @@ class Doctrine_Transaction_Pgsql extends Doctrine_Transaction
}
$query = 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL ' . $isolation;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
}

View File

@ -61,6 +61,6 @@ class Doctrine_Transaction_Sqlite extends Doctrine_Transaction
$query = 'PRAGMA read_uncommitted = '.$isolation;
return $this->conn->getDbh()->query($query);
return $this->conn->execute($query);
}
}