Lines Matching defs:pid
19 protected $pid;
57 public static function getPageAccess($tablename, $pid, $ts = 0)
60 return new AccessTablePage($schema, $pid, $ts, 0);
63 public static function getSerialAccess($tablename, $pid, $rid = 0)
66 return new AccessTableSerial($schema, $pid, 0, $rid);
79 * @param string $pid Page id to access
85 public static function bySchema(Schema $schema, $pid, $ts = 0, $rid = 0)
87 if (self::isTypePage($pid, $ts)) {
88 return new AccessTablePage($schema, $pid, $ts, $rid);
90 return new AccessTableGlobal($schema, $pid, $ts, $rid);
97 * @param string $pid Page id to access
104 public static function byTableName($tablename, $pid, $ts = 0, $rid = 0)
108 if (!self::isTypePage($pid, $ts)) {
113 return self::bySchema($schema, $pid, $ts, $rid);
120 * @param string $pid Page id
124 public function __construct($schema, $pid, $ts = 0, $rid = 0)
135 $this->pid = $pid;
154 * The current pid
160 return $this->pid;
224 $this->handleEmptyMulti($this->pid, $this->rid, $colrefs[$colname]);
442 $idColumn = self::isTypePage($this->pid, $this->ts) ? 'pid' : 'rid';
496 protected function buildGetDataSQL($idColumn = 'pid')
560 * time and pid. Used in
581 * @param string $pid
586 public static function isTypePage($pid, $rev)
594 * @param string $pid
599 public static function isTypeGlobal($pid, $rev)
601 return $pid === '';
607 * @param string $pid
612 public static function isTypeSerial($pid, $rev)
614 return $pid !== '' && $rev === 0;
621 * @param string $pid
625 protected function handleEmptyMulti($pid, $rid, $colref)
639 "DELETE FROM $this->mtable WHERE pid = ? AND rid = $this->rid AND rev = 0 AND colref IN (" .
641 [$this->pid]