Skip to content

Commit c44b01b

Browse files
Update readme #27
1 parent 734d482 commit c44b01b

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![codecov](https://codecov.io/gh/sqlitecloud/sqlitecloud-js/graph/badge.svg?token=ZOKE9WFH62)](https://codecov.io/gh/sqlitecloud/sqlitecloud-js)
88

99
> This is the future home of SQLiteCloud drivers for Javascript and Typescript v2
10-
> Currently under development, please keep using https://github.com/sqlitecloud/sdk
10+
> Currently under development, please open an issue for any problems, suggestions.
1111
1212
## Install
1313

@@ -18,14 +18,21 @@ npm install sqlitecloud-js
1818
## Usage
1919

2020
```ts
21-
import { myPackage } from 'my-package-name'
21+
// import sqlitecloud driver
22+
import { Database } from 'sqlitecloud-js'
2223

23-
myPackage('hello')
24-
//=> 'hello from my package'
24+
// trivial example here but let's suppose we have this in a variable
25+
let name = 'Ava Jones'
26+
27+
// run our prepared statement (or plain sql) with familiar print syntax
28+
let results = await database.sql`SELECT * FROM people WHERE name = ${name}`
29+
// => returns [{ id: 5, name: 'Ava Jones', age: 22, hobby: 'Time traveling' }]
2530
```
2631

2732
## API
2833

34+
We are striving to be 100% compatibile with the widely used sqlite3 APIs, the difference being that this driver connects to your SQLiteCloud database. You can take you local SQLite, deploy in the cloud and keep using the same code. Easy! You can also use Database.sql to run an async query.
35+
2936
### myPackage(input, options?)
3037

3138
#### input

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sqlitecloud-js",
3-
"version": "0.0.16-development",
3+
"version": "0.0.17-development",
44
"description": "SQLiteCloud drivers for Typescript/Javascript in edge, web and node clients",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",

0 commit comments

Comments
 (0)