Comparing version 2.0.1 to 2.1.0
{ | ||
"name": "rockset", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Client for querying Rockset and interacting with the Rockset API.", |
@@ -23,12 +23,25 @@ | ||
### Using Require | ||
```js | ||
const rockset = require("rockset").default(apikey, "https://api.rs2.usw2.rockset.com"); | ||
await rockset.queries.query({ | ||
sql: { query: "Select count(*) from _events" } | ||
}); | ||
``` | ||
### Using ES6 Import | ||
```ts | ||
import rocksetConfigure from "rockset"; | ||
const rockset = rocksetConfigure(apikey, "https://api.rs2.usw2.rockset.com"); | ||
await rockset.queries.query({ | ||
sql: { | ||
query | ||
} | ||
sql: { query: "Select count(*) from _events" } | ||
}); | ||
``` | ||
### Custom Fetch Function | ||
To supply a custom fetch function, we pass it in as the last parameter to rocksetConfigure. | ||
@@ -35,0 +48,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
372676
7798
116
114