Change to PDODocument library
This commit is contained in:
@@ -2,15 +2,14 @@
|
||||
|
||||
namespace FeedReaderCentral;
|
||||
|
||||
use BitBadger\Documents\Configuration;
|
||||
use BitBadger\Documents\DocumentException;
|
||||
use BitBadger\Documents\DocumentList;
|
||||
use BitBadger\Documents\Field;
|
||||
use BitBadger\Documents\JsonMapper;
|
||||
use BitBadger\Documents\Query;
|
||||
use BitBadger\Documents\SQLite\Custom;
|
||||
use BitBadger\Documents\SQLite\Parameters;
|
||||
use Iterator;
|
||||
use BitBadger\PDODocument\Configuration;
|
||||
use BitBadger\PDODocument\Custom;
|
||||
use BitBadger\PDODocument\DocumentException;
|
||||
use BitBadger\PDODocument\DocumentList;
|
||||
use BitBadger\PDODocument\Field;
|
||||
use BitBadger\PDODocument\Parameters;
|
||||
use BitBadger\PDODocument\Query;
|
||||
use BitBadger\PDODocument\Mapper\DocumentMapper;
|
||||
|
||||
/**
|
||||
* A list of items to be displayed
|
||||
@@ -61,7 +60,7 @@ class ItemList
|
||||
ItemWithFeed::SELECT_WITH_FEED . ' WHERE '
|
||||
. Query::whereByFields(array_filter($allFields, fn($it) => $it->paramName <> '@search'))
|
||||
. $searchWhere,
|
||||
Parameters::addFields($allFields, []), new JsonMapper(ItemWithFeed::class));
|
||||
Parameters::addFields($allFields, []), new DocumentMapper(ItemWithFeed::class));
|
||||
} catch (DocumentException $ex) {
|
||||
$this->error = "$ex";
|
||||
}
|
||||
@@ -141,7 +140,7 @@ class ItemList
|
||||
if ($isBookmarked) $fields[] = Data::bookmarkField(Table::ITEM);
|
||||
$list = new static('Matching' . ($isBookmarked ? ' Bookmarked' : ''),
|
||||
"/search?search=$search&items=" . ($isBookmarked ? 'bookmarked' : 'all'), $fields,
|
||||
' AND ' . Table::ITEM . ".data->>'" . Configuration::idField() . "' IN "
|
||||
' AND ' . Table::ITEM . ".data->>'" . Configuration::$idField . "' IN "
|
||||
. '(SELECT ROWID FROM item_search WHERE content MATCH @search)');
|
||||
$list->showIndicators = true;
|
||||
$list->displayFeed = true;
|
||||
|
||||
Reference in New Issue
Block a user