Add table to doc util script
- Remove db parameter from several places - Add constructors for document types
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use BitBadger\Documents\DocumentException;
|
||||
use BitBadger\Documents\SQLite\Configuration;
|
||||
use BitBadger\Documents\SQLite\Custom;
|
||||
use BitBadger\Documents\SQLite\Results;
|
||||
use FeedReaderCentral\Data;
|
||||
@@ -37,7 +38,12 @@ function display_help(): never
|
||||
*/
|
||||
function rebuild_index(): void
|
||||
{
|
||||
$db = Data::getConnection();
|
||||
try {
|
||||
$db = Configuration::dbConn();
|
||||
} catch (DocumentException $ex) {
|
||||
printfn("ERR: Cannot obtain a connection to the database\n $ex");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$hasIndex = Custom::scalar("SELECT COUNT(*) FROM sqlite_master WHERE name = 'item_ai'", [],
|
||||
|
||||
Reference in New Issue
Block a user