@polybase/client
TypeScript icon, indicating that this package has built-in type declarations

0.6.6 • Public • Published

Polybase Client (Browser/Node)

A client to connect to the Polybase decentralized database.

Install Polybase

npm install @polybase/client
yarn add @polybase/client

Initialize the SDK

import Polybase from '@polybase/client'

const db = new Polybase({
  ...config
})

Get a single record

You can read data once, by calling the .record(id: string).get() method on a collection.

const colRef = db.collection("org/places")
const record = await colRef.record("id").get()

const { id, ...data } = record

Write data

const colRef = db.collection("org/places")
const record = await colRef.record("london").call("setName", ["Name"])

Tests

To run E2E tests, ensure that Polybase is running, and then run:

yarn test:e2e

Readme

Keywords

none

Package Sidebar

Install

npm i @polybase/client

Weekly Downloads

65

Version

0.6.6

License

MIT

Unpacked Size

1.35 MB

Total Files

76

Last publish

Collaborators

  • patricklane
  • mateuszmlc
  • calum.moore