Add PostgreSQL version of SQLite integ tests

- Add PostgreSQL throwaway database
- Add optional length parameter for random string
- Fix syntax for PostgreSQL in several areas
- Add optional ID for whereById type determination
This commit is contained in:
2024-06-12 15:21:53 -04:00
parent 330e272187
commit 65fd46835c
37 changed files with 1111 additions and 84 deletions

View File

@@ -25,12 +25,13 @@ class Exists
* Query to determine if a document exists for the given ID
*
* @param string $tableName The name of the table in which document existence should be checked
* @param mixed $docId The ID of the document whose existence should be checked (optional; string ID assumed)
* @return string The query to determine document existence by ID
* @throws DocumentException If the database mode has not been set
*/
public static function byId(string $tableName): string
public static function byId(string $tableName, mixed $docId = null): string
{
return self::query($tableName, Query::whereById());
return self::query($tableName, Query::whereById(docId: $docId));
}
/**