First cut of item-with-feed and list impl

- Add strict types to all files
- Convert many queries to document commands
This commit is contained in:
2024-06-02 22:14:19 -04:00
parent b88ad1f268
commit 93dd8e880f
35 changed files with 309 additions and 319 deletions

View File

@@ -1,4 +1,5 @@
<?php
<?php declare(strict_types=1);
namespace FeedReaderCentral;
use BitBadger\Documents\DocumentException;
@@ -10,6 +11,7 @@ use BitBadger\Documents\SQLite\Custom;
use BitBadger\Documents\SQLite\Document;
use BitBadger\Documents\SQLite\Exists;
use BitBadger\Documents\SQLite\Find;
use BitBadger\Documents\SQLite\Parameters;
use BitBadger\Documents\SQLite\Patch;
use DateTimeInterface;
use SQLite3;
@@ -137,7 +139,7 @@ class Feed
SQL;
}
try {
Custom::nonQuery($sql, array_merge(array_map($it -> $it->asParameter(), $fields)), $db);
Custom::nonQuery($sql, Parameters::addFields($fields, []), $db);
return ['ok' => true];
} catch (DocumentException $ex) {
return ['error' => "$ex"];