We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c521672 commit 4e56724Copy full SHA for 4e56724
1 file changed
README.md
@@ -13,6 +13,27 @@ You can use this SDK both on browser and with NodeJS.
13
yarn add @boilingdata/node-boilingdata
14
```
15
16
+## Browser
17
+
18
+Copy and add `browser/boilingdata.min.js` script to your HTML.
19
20
+```html
21
+<script src="boilingdata.min.js"></script>
22
+<script>
23
+ const bdInstance = new BoilingData({ username: "myUsername", password: "myPw" });
24
+ let isConnected = false;
25
+ async function connectAndRunQuery() {
26
+ if (!isConnected) {
27
+ await bdInstance.connect();
28
+ isConnected = true;
29
+ }
30
+ const rows = await bdInstance.execQueryPromise({ sql: "SELECT 42;" });
31
+ console.log({ rows });
32
33
+ connectAndRunQuery();
34
+</script>
35
+```
36
37
## Basic Examples
38
39
`execQueryPromise()` method can be used to await for the results directly.
0 commit comments