Code Samples
Using Polybase database
import {DB} from "@dataprograms/repdao-polybase";
import { Polybase } from "@polybase/client"
const db = new Polybase({ defaultNamespace: "NAME_SPACE" });Code Samples
Filtering by single column value in single collection
import {DB, filfox} from "@dataprograms/repdao-polybase";
const provider = 'f01889512'
const doc = (await DB.collection('filfox')
.where('provider', '==', provider)
.limit(1).get())
.data[0].data as filfox
console.log(`Filfox record for ${provider}: total rewards: ${doc.totalRewards}`)Iterating over all the provided collections
Sorting column to find max or min
Using sort and limit to find the top n
Finding rows X days ago
Last updated