Lines Matching refs:db
27 static $db = null;
28 if ($db !== null) {
29 return $db;
34 $db = new SQLiteDB('tagging', __DIR__ . '/db/');
36 $db->getPdo()->sqliteCreateFunction('CLEANTAG', [$this, 'cleanTag'], 1);
37 $db->getPdo()->sqliteCreateFunction(
47 $db->getPdo()->sqliteCreateFunction('GET_NS', 'getNS', 1);
49 return $db;
154 $db = $this->getDB();
155 $db->exec('BEGIN TRANSACTION');
164 call_user_func_array([$db, 'exec'], $query);
167 $db->exec('ROLLBACK TRANSACTION');
172 $db->exec('COMMIT TRANSACTION');
422 $db = $this->getDB();
440 return $db->queryAll($query, $params);
455 $db = $this->getDB();
458 array_column($db->queryAll($query), 'tags', 'pid')
481 $db = $this->getDB();
498 $db->exec('BEGIN TRANSACTION');
510 $db->exec($insertQuery . $where, $params);
513 $db->exec('ROLLBACK TRANSACTION');
524 $db->exec($deleteQuery . $where, $params);
527 $db->exec('ROLLBACK TRANSACTION');
532 $db->exec('COMMIT TRANSACTION');
548 $db = $this->getDB();
550 $check = $db->queryAll(
561 $db->exec(
567 $db->exec(
592 $db = $this->getDB();
606 $numAffectedPages = $db->exec($affectedPagesQuery, $args);
609 $db->exec($deleteQuery, $args);
619 $db = $this->getDB();
623 $db->exec($query);
634 $db = $this->getDB();
635 $db->exec('UPDATE taggings SET pid = ? WHERE pid = ?', $newName, $oldName);
712 $db = $this->getDB();
714 $pages = $db->queryAll($sql, $tid);
990 $db = $this->getDB();
991 if (!$db) {
995 $res = $db->queryAll($query[0], $query[1]);
1034 $db = $this->getDB();
1042 return $db->queryAll($query);