Add PostgreSQL Support (#3)

Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
2024-06-21 13:46:41 +00:00
parent 330e272187
commit 124426fa12
61 changed files with 2290 additions and 223 deletions

View File

@@ -31,4 +31,16 @@ class Definition
{
Custom::nonQuery(Query\Definition::ensureIndexOn($tableName, $indexName, $fields), []);
}
/**
* Create a full-document index on a table (PostgreSQL only)
*
* @param string $tableName The name of the table on which the document index should be created
* @param DocumentIndex $indexType The type of document index to create
* @throws DocumentException If the database mode is not PostgreSQL or if an error occurs creating the index
*/
public static function ensureDocumentIndex(string $tableName, DocumentIndex $indexType): void
{
Custom::nonQuery(Query\Definition::ensureDocumentIndexOn($tableName, $indexType), []);
}
}