Options
Configure hyper-sql inside the options object of its contentMappers entry in tsconfig.json:
json
"contentMappers": [
{
"package": "@exprtlabs/hyper-sql",
"extensions": [".sql"],
"options": { "dialect": "postgres", "schema": "db/schema.sql" }
}
]Both hyper-sql pull and the content mapper read this same configuration.
Configure these keys inside the options object of hyper-sql's contentMappers entry in tsconfig.json. Both hyper-sql pull and the mapper read the same object and reject unknown keys.
| Option | Meaning |
|---|---|
dialect | "sqlite" or "postgres". The only required option. |
schema | Path to your schema DDL file. Defaults to "db/schema.sql". |
lock | Path to the lock file. Defaults to "sql.lock". |
types | { "int8": "bigint" | "number", "timestamp": "string" | "Date" } (both keys optional). Applies to Postgres only; SQLite projects accept and ignore it (use -- @type bigint on individual SQLite INTEGER columns instead, and dates remain string). |
sqliteStrict | Defaults to true, rejecting non-STRICT SQLite tables; set false to allow them. |
See Project-wide type options for details on what each types setting affects, and make sure your tsconfig.json's include array covers your .sql files.