Add docs link, misc format tweaks

This commit is contained in:
2024-07-21 22:02:16 -04:00
parent d8330d828a
commit 0659de3f99
16 changed files with 49 additions and 48 deletions

View File

@@ -27,7 +27,7 @@ class Definition
{
$dataType = match (Configuration::mode('make create table statement')) {
Mode::PgSQL => 'JSONB',
Mode::SQLite => 'TEXT'
Mode::SQLite => 'TEXT',
};
return "CREATE TABLE IF NOT EXISTS $name (data $dataType NOT NULL)";
}
@@ -91,7 +91,7 @@ class Definition
[, $tbl] = self::splitSchemaAndTable($tableName);
$extraOps = match ($indexType) {
DocumentIndex::Full => '',
DocumentIndex::Optimized => ' jsonb_path_ops'
DocumentIndex::Optimized => ' jsonb_path_ops',
};
return "CREATE INDEX IF NOT EXISTS idx_{$tbl}_document ON $tableName USING GIN (data$extraOps)";
}