Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/storage/connection/AphrontDatabaseConnection.php
<?php | <?php | ||||
/** | /** | ||||
* @task xaction Transaction Management | * @task xaction Transaction Management | ||||
*/ | */ | ||||
abstract class AphrontDatabaseConnection | abstract class AphrontDatabaseConnection | ||||
extends Phobject | extends Phobject | ||||
implements PhutilQsprintfInterface { | implements PhutilQsprintfInterface { | ||||
private $transactionState; | private $transactionState; | ||||
private $readOnly; | private $readOnly; | ||||
private $queryTimeout; | private $queryTimeout; | ||||
private $locks = array(); | private $locks = array(); | ||||
private $lastActiveEpoch; | |||||
abstract public function getInsertID(); | abstract public function getInsertID(); | ||||
abstract public function getAffectedRows(); | abstract public function getAffectedRows(); | ||||
abstract public function selectAllResults(); | abstract public function selectAllResults(); | ||||
abstract public function executeRawQuery($raw_query); | abstract public function executeRawQuery($raw_query); | ||||
abstract public function executeRawQueries(array $raw_queries); | abstract public function executeRawQueries(array $raw_queries); | ||||
abstract public function close(); | abstract public function close(); | ||||
abstract public function openConnection(); | abstract public function openConnection(); | ||||
final public function setLastActiveEpoch($epoch) { | |||||
$this->lastActiveEpoch = $epoch; | |||||
return $this; | |||||
} | |||||
final public function getLastActiveEpoch() { | |||||
return $this->lastActiveEpoch; | |||||
} | |||||
public function queryData($pattern/* , $arg, $arg, ... */) { | public function queryData($pattern/* , $arg, $arg, ... */) { | ||||
$args = func_get_args(); | $args = func_get_args(); | ||||
array_unshift($args, $this); | array_unshift($args, $this); | ||||
return call_user_func_array('queryfx_all', $args); | return call_user_func_array('queryfx_all', $args); | ||||
} | } | ||||
public function query($pattern/* , $arg, $arg, ... */) { | public function query($pattern/* , $arg, $arg, ... */) { | ||||
$args = func_get_args(); | $args = func_get_args(); | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |