Skip to content

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.

OptionMeaning
dialect"sqlite" or "postgres". The only required option.
schemaPath to your schema DDL file. Defaults to "db/schema.sql".
lockPath 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).
sqliteStrictDefaults 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.