# nodeSqlite

`function` in `plugin-kysely` · v0.9.0

<https://seedcord.org/docs/packages/plugin-kysely/0.9.0/functions/node-sqlite>

Wraps a `node:sqlite` database for Kysely's `SqliteDialect`.

Kysely passes a query's parameters as one array and reads a `reader` flag off each statement. `node:sqlite` takes
the parameters spread out, and its statements don't carry that flag. This wrapper spreads the array and sets the
flag from the statement's columns.

```ts
nodeSqlite(database: DatabaseSync): SqliteDatabase
```

Wraps a `node:sqlite` database for Kysely's `SqliteDialect`.

Kysely passes a query's parameters as one array and reads a `reader` flag off each statement. `node:sqlite` takes
the parameters spread out, and its statements don't carry that flag. This wrapper spreads the array and sets the
flag from the statement's columns.

Parameters.

- `database` `DatabaseSync`

Returns `SqliteDatabase`.
