Skip to content

Commit 9e5550f

Browse files
committed
docs: remove non existent sql import
resolves #57
1 parent f5c30bf commit 9e5550f

File tree

10 files changed

+17
-16
lines changed

10 files changed

+17
-16
lines changed

docs/1.guide/1.index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Install [`db0`](https://npmjs.com/package/db0) npm package:
2424
:pm-install{name="db0"}
2525

2626
```ts
27-
import { createDatabase, sql } from "db0";
27+
import { createDatabase } from "db0";
2828
import sqlite from "db0/connectors/better-sqlite3";
2929

3030
// Initiate database with SQLite connector
@@ -43,12 +43,12 @@ console.log(rows);
4343

4444
// Using static parameters
4545
const tableName = "users";
46-
const { rows } = await db.sql`SELECT * FROM {${tableName}} WHERE id = ${userId}`;
46+
const { rows } =
47+
await db.sql`SELECT * FROM {${tableName}} WHERE id = ${userId}`;
4748
console.log(rows);
4849
```
4950

50-
> [!IMPORTANT]
51-
> **Static Parameters** are a way to use string-literals other than places where prepared statements are supported, for eg. table name. **DO NOT USE** static parameters from untrusted source such as request body. **STATIC PARAMETERS ARE NOT SANITISED**
51+
> [!IMPORTANT] > **Static Parameters** are a way to use string-literals other than places where prepared statements are supported, for eg. table name. **DO NOT USE** static parameters from untrusted source such as request body. **STATIC PARAMETERS ARE NOT SANITISED**
5252
5353
## Next steps
5454

docs/2.connectors/bun.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ icon: simple-icons:bun
1616
Use `bun-sqlite` connector:
1717

1818
```js
19-
import { createDatabase, sql } from "db0";
19+
import { createDatabase } from "db0";
2020
import bunSqlite from "db0/connectors/bun-sqlite";
2121

2222
const db = createDatabase(bunSqlite({}));

docs/2.connectors/cloudflare.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ icon: devicon-plain:cloudflareworkers
1616
Use `cloudflare-d1` connector:
1717

1818
```js
19-
import { createDatabase, sql } from "db0";
19+
import { createDatabase } from "db0";
2020
import cloudflareD1 from "db0/connectors/cloudflare-d1";
2121

2222
const db = createDatabase(

docs/2.connectors/libsql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ Choose on of the `libsql`, `libsql/http` or `libsql/web` connectors depending on
1919
::code-group
2020

2121
```ts [libsql.node.js]
22-
import { createDatabase, sql } from "db0";
22+
import { createDatabase } from "db0";
2323
import libSql from "db0/connectors/libsql";
2424

2525
const db = createDatabase(libSql({ url: `file:local.db` }));
2626
```
2727

2828
```ts [libsql.http.js]
29-
import { createDatabase, sql } from "db0";
29+
import { createDatabase } from "db0";
3030
import libSql from "db0/connectors/libsql/http";
3131

3232
const db = createDatabase(libSql({}));
3333
```
3434

3535
```ts [libsql.web.js]
36-
import { createDatabase, sql } from "db0";
36+
import { createDatabase } from "db0";
3737
import libSql from "db0/connectors/libsql/web";
3838

3939
const db = createDatabase(libSql({}));

docs/2.connectors/mysql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For this connector, you need to install [`mysql2`](https://www.npmjs.com/package
1515
Use `mysql2` connector:
1616

1717
```js
18-
import { createDatabase, sql } from "db0";
18+
import { createDatabase } from "db0";
1919
import mysql from "db0/connectors/mysql2";
2020

2121
const db = createDatabase(

docs/2.connectors/pglite.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For this connector, you need to install [`@electric-sql/pglite`](https://www.npm
1717
Use `pglite` connector:
1818

1919
```js
20-
import { createDatabase, sql } from "db0";
20+
import { createDatabase } from "db0";
2121
import pglite from "db0/connectors/pglite";
2222

2323
const db = createDatabase(
@@ -28,6 +28,7 @@ const db = createDatabase(
2828
```
2929

3030
<!-- copy from https://pglite.dev/docs/api#main-constructor -->
31+
3132
## Options
3233

3334
### `dataDir`
@@ -92,4 +93,4 @@ The database from the Postgres cluster within the `dataDir` to connect to.
9293

9394
The initial amount of memory in bytes to allocate for the PGlite instance. PGlite will grow the memory automatically, but if you have a particularly large database, you can set this higher to prevent the pause during memory growth.
9495

95-
**Type:** `number`
96+
**Type:** `number`

docs/2.connectors/planetscale.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For this connector, you need to install [`@planetscale/database`](https://www.np
1717
Use `planetscale` connector:
1818

1919
```js
20-
import { createDatabase, sql } from "db0";
20+
import { createDatabase } from "db0";
2121
import planetscale from "db0/connectors/planetscale";
2222

2323
const db = createDatabase(

docs/2.connectors/postgresql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For this connector, you need to install [`pg`](https://www.npmjs.com/package/pg)
1717
Use `postgresql` connector:
1818

1919
```js
20-
import { createDatabase, sql } from "db0";
20+
import { createDatabase } from "db0";
2121
import postgresql from "db0/connectors/postgresql";
2222

2323
const db = createDatabase(

docs/2.connectors/sqlite.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For this connector, you need to install [`better-sqlite3`](https://www.npmjs.com
1717
Use `better-sqlite3` connector:
1818

1919
```js
20-
import { createDatabase, sql } from "db0";
20+
import { createDatabase } from "db0";
2121
import sqlite from "db0/connectors/better-sqlite3";
2222

2323
const db = createDatabase(

docs/2.connectors/vercel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A dedicated `vercel` connector is planned to be supported. Follow up via [unjs/d
1717
Use [`postgres`](/connectors/postgresql) connector:
1818

1919
```js
20-
import { createDatabase, sql } from "db0";
20+
import { createDatabase } from "db0";
2121
import postgres from "db0/connectors/postgres";
2222

2323
const db = createDatabase(

0 commit comments

Comments
 (0)