Missed document param prefix updates

This commit is contained in:
Daniel J. Summers 2024-06-04 22:36:58 -04:00
parent 1e7c41eaa2
commit bcca9f5ace

View File

@ -19,7 +19,7 @@ class Document
*/
public static function insert(string $tableName, array|object $document, ?PDO $pdo = null): void
{
Custom::nonQuery(Query::insert($tableName), Parameters::json('@data', $document), $pdo);
Custom::nonQuery(Query::insert($tableName), Parameters::json(':data', $document), $pdo);
}
/**
@ -32,7 +32,7 @@ class Document
*/
public static function save(string $tableName, array|object $document, ?PDO $pdo = null): void
{
Custom::nonQuery(Query::save($tableName), Parameters::json('@data', $document), $pdo);
Custom::nonQuery(Query::save($tableName), Parameters::json(':data', $document), $pdo);
}
/**
@ -47,6 +47,6 @@ class Document
public static function update(string $tableName, mixed $docId, array|object $document, ?PDO $pdo = null): void
{
Custom::nonQuery(Query::update($tableName),
array_merge(Parameters::id($docId), Parameters::json('@data', $document)), $pdo);
array_merge(Parameters::id($docId), Parameters::json(':data', $document)), $pdo);
}
}