This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via 44bf1fc5d50edb27caf449b1c04bf488884cf351 (commit)
via ec2ccf95487f5571237f2cb671a105436d053fc7 (commit)
from c240074d2392b0316ff30a8e19d711053581b676 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 44bf1fc5d50edb27caf449b1c04bf488884cf351
Author: Ivan Borzenkov <iva...@li...>
Date: Sat Aug 7 19:47:00 2010 +0400
Удалены *pdo_Blob за ненадобностью
diff --git a/lib/DbSimple/Litepdo.php b/lib/DbSimple/Litepdo.php
index 36d4a1a..5cc722d 100644
--- a/lib/DbSimple/Litepdo.php
+++ b/lib/DbSimple/Litepdo.php
@@ -151,39 +151,4 @@ class DbSimple_Litepdo extends DbSimple_Generic_Database
}
-class DbSimple_Mypdo_Blob implements DbSimple_Generic_Blob
-{
- // MySQL does not support separate BLOB fetching.
- private $blobdata = null;
- private $curSeek = 0;
-
- public function __construct(&$database, $blobdata=null)
- {
- $this->blobdata = $blobdata;
- $this->curSeek = 0;
- }
-
- public function read($len)
- {
- $p = $this->curSeek;
- $this->curSeek = min($this->curSeek + $len, strlen($this->blobdata));
- return substr($this->blobdata, $this->curSeek, $len);
- }
-
- public function write($data)
- {
- $this->blobdata .= $data;
- }
-
- public function close()
- {
- return $this->blobdata;
- }
-
- public function length()
- {
- return strlen($this->blobdata);
- }
-}
-
?>
\ No newline at end of file
diff --git a/lib/DbSimple/Mypdo.php b/lib/DbSimple/Mypdo.php
index 9c769e5..460aedf 100644
--- a/lib/DbSimple/Mypdo.php
+++ b/lib/DbSimple/Mypdo.php
@@ -141,39 +141,4 @@ class DbSimple_Mypdo extends DbSimple_Generic_Database
}
-class DbSimple_Mypdo_Blob implements DbSimple_Generic_Blob
-{
- // MySQL does not support separate BLOB fetching.
- private $blobdata = null;
- private $curSeek = 0;
-
- public function __construct(&$database, $blobdata=null)
- {
- $this->blobdata = $blobdata;
- $this->curSeek = 0;
- }
-
- public function read($len)
- {
- $p = $this->curSeek;
- $this->curSeek = min($this->curSeek + $len, strlen($this->blobdata));
- return substr($this->blobdata, $this->curSeek, $len);
- }
-
- public function write($data)
- {
- $this->blobdata .= $data;
- }
-
- public function close()
- {
- return $this->blobdata;
- }
-
- public function length()
- {
- return strlen($this->blobdata);
- }
-}
-
?>
\ No newline at end of file
commit ec2ccf95487f5571237f2cb671a105436d053fc7
Author: Ivan Borzenkov <iva...@li...>
Date: Sat Aug 7 19:26:54 2010 +0400
Переименовал все коннекты в link
diff --git a/lib/DbSimple/Litepdo.php b/lib/DbSimple/Litepdo.php
index 5b3d774..36d4a1a 100644
--- a/lib/DbSimple/Litepdo.php
+++ b/lib/DbSimple/Litepdo.php
@@ -22,7 +22,7 @@ require_once dirname(__FILE__).'/Generic.php';
*/
class DbSimple_Litepdo extends DbSimple_Generic_Database
{
- private $PDO;
+ private $link;
public function DbSimple_Litepdo($dsn)
{
@@ -30,17 +30,17 @@ class DbSimple_Litepdo extends DbSimple_Generic_Database
return $this->_setLastError("-1", "PDO extension is not loaded", "PDO");
try {
- $this->PDO = new PDO('sqlite:'.$dsn['path']);
+ $this->link = new PDO('sqlite:'.$dsn['path']);
} catch (PDOException $e) {
$this->_setLastError($e->getCode() , $e->getMessage(), 'new PDO');
}
- $this->PDO->exec('SET NAMES '.(isset($dsn['enc'])?$dsn['enc']:'UTF8'));
+ $this->link->exec('SET NAMES '.(isset($dsn['enc'])?$dsn['enc']:'UTF8'));
}
public function CreateFunction($function_name, $callback, $num_args)
- { return $this->PDO->sqliteCreateFunction($function_name, $callback, $num_args); }
+ { return $this->link->sqliteCreateFunction($function_name, $callback, $num_args); }
public function CreateAggregate($function_name, $step_func, $finalize_func, $num_args)
- { return $this->PDO->CreateAggregate($function_name, $step_func, $finalize_func, $num_args); }
+ { return $this->link->CreateAggregate($function_name, $step_func, $finalize_func, $num_args); }
protected function _performGetPlaceholderIgnoreRe()
{
@@ -55,7 +55,7 @@ class DbSimple_Litepdo extends DbSimple_Generic_Database
protected function _performEscape($s, $isIdent=false)
{
if (!$isIdent) {
- return $this->PDO->quote($s);
+ return $this->link->quote($s);
} else {
return "`" . str_replace('`', '``', $s) . "`";
}
@@ -63,30 +63,30 @@ class DbSimple_Litepdo extends DbSimple_Generic_Database
protected function _performTransaction($parameters=null)
{
- return $this->PDO->beginTransaction();
+ return $this->link->beginTransaction();
}
protected function _performCommit()
{
- return $this->PDO->commit();
+ return $this->link->commit();
}
protected function _performRollback()
{
- return $this->PDO->rollBack();
+ return $this->link->rollBack();
}
protected function _performQuery($queryMain)
{
$this->_lastQuery = $queryMain;
$this->_expandPlaceholders($queryMain, false);
- $p = $this->PDO->query($queryMain[0]);
+ $p = $this->link->query($queryMain[0]);
if (!$p)
return $this->_setDbError($p,$queryMain[0]);
if ($p->errorCode()!=0)
return $this->_setDbError($p,$queryMain[0]);
if (preg_match('/^\s* INSERT \s+/six', $queryMain[0]))
- return $this->PDO->lastInsertId();
+ return $this->link->lastInsertId();
if ($p->columnCount()==0)
return $p->rowCount();
//Если у нас в запросе есть хотя-бы одна колонка - это по любому будет select
@@ -131,7 +131,7 @@ class DbSimple_Litepdo extends DbSimple_Generic_Database
protected function _setDbError($obj,$q)
{
- $info=$obj?$obj->errorInfo():$this->PDO->errorInfo();
+ $info=$obj?$obj->errorInfo():$this->link->errorInfo();
return $this->_setLastError($info[1], $info[2], $q);
}
diff --git a/lib/DbSimple/Mypdo.php b/lib/DbSimple/Mypdo.php
index b936248..9c769e5 100644
--- a/lib/DbSimple/Mypdo.php
+++ b/lib/DbSimple/Mypdo.php
@@ -22,7 +22,7 @@ require_once dirname(__FILE__).'/Generic.php';
*/
class DbSimple_Mypdo extends DbSimple_Generic_Database
{
- private $PDO;
+ private $link;
public function DbSimple_Mypdo($dsn)
{
@@ -31,7 +31,7 @@ class DbSimple_Mypdo extends DbSimple_Generic_Database
return $this->_setLastError("-1", "PDO extension is not loaded", "PDO");
try {
- $this->PDO = new PDO('mysql:host='.$dsn['host'].(empty($dsn['port'])?'':';port='.$dsn['port']).';dbname='.$base,
+ $this->link = new PDO('mysql:host='.$dsn['host'].(empty($dsn['port'])?'':';port='.$dsn['port']).';dbname='.$base,
$dsn['user'], isset($dsn['pass'])?$dsn['pass']:'', array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT,
PDO::ATTR_PERSISTENT => isset($dsn['persist']) && $dsn['persist'],
@@ -56,7 +56,7 @@ class DbSimple_Mypdo extends DbSimple_Generic_Database
protected function _performEscape($s, $isIdent=false)
{
if (!$isIdent) {
- return $this->PDO->quote($s);
+ return $this->link->quote($s);
} else {
return "`" . str_replace('`', '``', $s) . "`";
}
@@ -64,30 +64,30 @@ class DbSimple_Mypdo extends DbSimple_Generic_Database
protected function _performTransaction($parameters=null)
{
- return $this->PDO->beginTransaction();
+ return $this->link->beginTransaction();
}
protected function _performCommit()
{
- return $this->PDO->commit();
+ return $this->link->commit();
}
protected function _performRollback()
{
- return $this->PDO->rollBack();
+ return $this->link->rollBack();
}
protected function _performQuery($queryMain)
{
$this->_lastQuery = $queryMain;
$this->_expandPlaceholders($queryMain, false);
- $p = $this->PDO->query($queryMain[0]);
+ $p = $this->link->query($queryMain[0]);
if (!$p)
return $this->_setDbError($p,$queryMain[0]);
if ($p->errorCode()!=0)
return $this->_setDbError($p,$queryMain[0]);
if (preg_match('/^\s* INSERT \s+/six', $queryMain[0]))
- return $this->PDO->lastInsertId();
+ return $this->link->lastInsertId();
if ($p->columnCount()==0)
return $p->rowCount();
//Если у нас в запросе есть хотя-бы одна колонка - это по любому будет select
@@ -121,7 +121,7 @@ class DbSimple_Mypdo extends DbSimple_Generic_Database
protected function _setDbError($obj,$q)
{
- $info=$obj?$obj->errorInfo():$this->PDO->errorInfo();
+ $info=$obj?$obj->errorInfo():$this->link->errorInfo();
return $this->_setLastError($info[1], $info[2], $q);
}
diff --git a/lib/DbSimple/Sqlite.php b/lib/DbSimple/Sqlite.php
index 674e3ab..1190007 100644
--- a/lib/DbSimple/Sqlite.php
+++ b/lib/DbSimple/Sqlite.php
@@ -21,7 +21,7 @@ require_once dirname(__FILE__).'/Generic.php';
*/
class DbSimple_Sqlite extends DbSimple_Generic_Database
{
- private $db;
+ private $link;
public function __construct($dsn)
{
$connect = 'sqlite_'.((isset($dsn['persist']) && $dsn['persist'])?'p':'').'open';
@@ -30,7 +30,7 @@ class DbSimple_Sqlite extends DbSimple_Generic_Database
$err = '';
try
{
- $this->db = sqlite_factory($dsn['path'], 0666, &$err);
+ $this->link = sqlite_factory($dsn['path'], 0666, &$err);
}
catch (Exception $e)
{
@@ -39,9 +39,9 @@ class DbSimple_Sqlite extends DbSimple_Generic_Database
}
public function CreateFunction($function_name, $callback, $num_args)
- { return $this->db->createFunction($function_name, $callback, $num_args); }
+ { return $this->link->createFunction($function_name, $callback, $num_args); }
public function CreateAggregate($function_name, $step_func, $finalize_func, $num_args)
- { return $this->db->createAggregate($function_name, $step_func, $finalize_func, $num_args); }
+ { return $this->link->createAggregate($function_name, $step_func, $finalize_func, $num_args); }
protected function _performGetPlaceholderIgnoreRe()
{
@@ -64,17 +64,17 @@ class DbSimple_Sqlite extends DbSimple_Generic_Database
protected function _performTransaction($parameters=null)
{
- return $this->db->query('BEGIN TRANSACTION');
+ return $this->link->query('BEGIN TRANSACTION');
}
protected function _performCommit()
{
- return $this->db->query('COMMIT TRANSACTION');
+ return $this->link->query('COMMIT TRANSACTION');
}
protected function _performRollback()
{
- return $this->db->query('ROLLBACK TRANSACTION');
+ return $this->link->query('ROLLBACK TRANSACTION');
}
protected function _performQuery($queryMain)
@@ -82,15 +82,15 @@ class DbSimple_Sqlite extends DbSimple_Generic_Database
$this->_lastQuery = $queryMain;
$this->_expandPlaceholders($queryMain, false);
$error_msg = '';
- $p = $this->db->query($queryMain[0], SQLITE_ASSOC, $error_msg);
+ $p = $this->link->query($queryMain[0], SQLITE_ASSOC, $error_msg);
if (!$p)
return $this->_setDbError($p->lastError(), $error_msg, $queryMain[0]);
if ($error_msg)
return $this->_setDbError($p->lastError(), $error_msg, $queryMain[0]);
if (preg_match('/^\s* INSERT \s+/six', $queryMain[0]))
- return $this->db->lastInsertRowid();
+ return $this->link->lastInsertRowid();
if ($p->numFields()==0)
- return $this->db->changes();
+ return $this->link->changes();
//Если у нас в запросе есть хотя-бы одна колонка - это по любому будет select
return $p->fetchAll(SQLITE_ASSOC);
}
-----------------------------------------------------------------------
Summary of changes:
lib/DbSimple/Litepdo.php | 59 +++++++++------------------------------------
lib/DbSimple/Mypdo.php | 53 +++++++----------------------------------
lib/DbSimple/Sqlite.php | 20 +++++++-------
3 files changed, 31 insertions(+), 101 deletions(-)
hooks/post-receive
--
quickfw
|