Lines Matching defs:table
8 * Manages the assignment of schemas (table names) to pages and namespaces.
67 * Add a new assignment pattern to the pattern table
70 * @param string $table
73 public function addPattern($pattern, $table)
77 $ok = (bool)$this->sqlite->query($sql, [$pattern, $table]);
81 $this->propagatePageAssignments($table);
88 * Remove an existing assignment pattern from the pattern table
91 * @param string $table
94 public function removePattern($pattern, $table)
98 $ok = (bool)$this->sqlite->query($sql, [$pattern, $table]);
105 $pagerows = $this->sqlite->queryAll($sql, [$table]);
110 if (!in_array($table, $tables)) {
111 $this->deassignPageSchema($row['pid'], $table);
173 * @param string $table
176 public function assignPageSchema($page, $table)
179 return (bool)$this->sqlite->query($sql, [$page, $table]);
186 * @param string $table
189 public function deassignPageSchema($page, $table)
192 return (bool)$this->sqlite->query($sql, [$page, $table]);
196 * Get the whole pattern table
206 * Returns a list of table names assigned to the given page
328 $table = $row['tbl'];
330 $sql = "SELECT pid FROM data_$table WHERE pid = ? AND rev <= ? LIMIT 1";
333 if ($found) $assigned[] = $table;
343 * @param $table
345 public function propagatePageAssignments($table)
348 $pagerows = $this->sqlite->queryAll($sql, [$table]);
352 if (in_array($table, $tables)) {
353 $this->assignPageSchema($row['pid'], $table);