Lines Matching refs:schema

18     protected $schema;
59 $schema = new Schema($tablename, $ts);
60 return new AccessTablePage($schema, $pid, $ts, 0);
65 $schema = new Schema($tablename, 0);
66 return new AccessTableSerial($schema, $pid, 0, $rid);
71 $schema = new Schema($tablename, 0);
72 return new AccessTableGlobal($schema, '', 0, $rid);
78 * @param Schema $schema schema to load
85 public static function bySchema(Schema $schema, $pid, $ts = 0, $rid = 0)
88 return new AccessTablePage($schema, $pid, $ts, $rid);
90 return new AccessTableGlobal($schema, $pid, $ts, $rid);
96 * @param string $tablename schema to load
106 // force loading the latest schema for anything other than page data,
109 $schema = new Schema($tablename, time());
111 $schema = new Schema($tablename, $ts);
113 return self::bySchema($schema, $pid, $ts, $rid);
119 * @param Schema $schema The schema valid at $ts
124 public function __construct($schema, $pid, $ts = 0, $rid = 0)
130 if (!$schema->getId()) {
134 $this->schema = $schema;
138 foreach ($this->schema->getColumns() as $col) {
144 * gives access to the schema
150 return $this->schema;
205 $this->stable = 'data_' . $this->schema->getTable();
206 $this->mtable = 'multi_' . $this->schema->getTable();
212 throw new StructException("Unknown column %s in schema.", hsc($colname));
461 foreach ($this->schema->getColumns(false) as $col) {
492 * Builds the SQL statement to select the data for this page and schema
499 $stable = 'data_' . $this->schema->getTable();
500 $mtable = 'multi_' . $this->schema->getTable();
507 foreach ($this->schema->getColumns(false) as $col) {
542 if ($ts && $ts < $this->schema->getTimeStamp()) {