Skip to content

Commit fc3f90c

Browse files
committed
libsql is no longer experimental
1 parent 35aa56e commit fc3f90c

21 files changed

+1372
-340
lines changed

Cargo.lock

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "libsql-experimental"
2+
name = "libsql"
33
version = "0.0.1"
44
description = ""
55
authors = ["Pekka Enberg <penberg@iki.fi>"]

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# libSQL API for Node
22

3-
[![npm](https://badge.fury.io/js/libsql-experimental.svg)](https://badge.fury.io/js/libsql-experimental)
3+
[![npm](https://badge.fury.io/js/libsql.svg)](https://badge.fury.io/js/libsql)
44

55
[libSQL](https://github.com/libsql/libsql) is an open source, open contribution fork of SQLite.
66
This source repository contains libSQL API bindings for Node, which aims to be compatible with [better-sqlite3](https://github.com/WiseLibs/better-sqlite3/), but with opt-in promise API.
@@ -16,7 +16,7 @@ This source repository contains libSQL API bindings for Node, which aims to be c
1616
You can install the package with `npm`:
1717

1818
```sh
19-
npm i libsql-experimental
19+
npm i libsql
2020
```
2121

2222
## Documentation
@@ -28,7 +28,7 @@ npm i libsql-experimental
2828
To try out your first libsql program, type the following in `hello.js`:
2929

3030
```javascript
31-
import Database from 'libsql-experimental';
31+
import Database from 'libsql';
3232

3333
const db = new Database(':memory:');
3434

@@ -46,10 +46,10 @@ and then run:
4646
$ node hello.js
4747
```
4848

49-
To use the promise API, import `libsql-experimental/promise`:
49+
To use the promise API, import `libsql/promise`:
5050

5151
```javascript
52-
import Database from 'libsql-experimental/promise';
52+
import Database from 'libsql/promise';
5353

5454
const db = new Database(':memory:');
5555

@@ -65,15 +65,15 @@ console.log(`Name: ${row.name}, email: ${row.email}`);
6565
#### Connecting to a local database file
6666

6767
```javascript
68-
import Database from 'libsql-experimental';
68+
import Database from 'libsql';
6969

7070
const db = new Database('hello.db');
7171
````
7272

7373
#### Connecting to a Remote libSQL server
7474

7575
```javascript
76-
import Database from 'libsql-experimental';
76+
import Database from 'libsql';
7777
7878
const url = process.env.LIBSQL_URL;
7979
const authToken = process.env.LIBSQL_AUTH_TOKEN;
@@ -88,7 +88,7 @@ const db = new Database(url, opts);
8888
#### Creating an in-app replica and syncing it
8989

9090
```javascript
91-
import libsql_experimental as libsql
91+
import libsql
9292
9393
const opts = { syncUrl: "<url>", authToken: "<optional auth token>" };
9494
const db = new Database('hello.db', opts);
@@ -126,7 +126,7 @@ You can then run the integration tests with:
126126
```console
127127
npm link
128128
cd integration-tests
129-
npm link libsql-experimental
129+
npm link libsql
130130
npm test
131131
```
132132

@@ -140,4 +140,4 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
140140
for inclusion in libSQL by you, shall be licensed as MIT, without any additional
141141
terms or conditions.
142142

143-
[MIT license]: https://github.com/libsql/libsql-experimental-node/blob/main/LICENSE
143+
[MIT license]: https://github.com/libsql/libsql-node/blob/main/LICENSE

examples/drizzle/index.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';
22
import { drizzle } from 'drizzle-orm/better-sqlite3';
3-
import Database from 'libsql-experimental';
3+
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
4+
import Database from 'libsql';
45

56
const users = sqliteTable('users', {
67
id: integer('id').primaryKey(), // 'id' is the column name
78
fullName: text('full_name'),
89
})
910

10-
const opts = {
11-
syncUrl: 'http://localhost:8081'
12-
};
13-
const sqlite = new Database('sqlite.db', opts);
14-
15-
sqlite.sync();
11+
const sqlite = new Database('drizzle.db');
1612

1713
const db = drizzle(sqlite);
1814

0 commit comments

Comments
 (0)