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

0.1.9 • Public • Published

Cognica Javascript Client

A Javascript client for Cognica database server.

Installation

npm install @cognica/client

Example

const collection = "cognica.js.test"
const channel = new Channel("localhost", 10080)
const doc_db = new DocumentDB(channel)

await doc_db.createCollection(collection, indexes)
const data = [
  { doc_id: "1", author: "jaepil", content: "get started" },
  { doc_id: "2", author: "finn", content: "vector database cookbook" },
]
await doc_db.insert(collection, data)

const df = await doc_db.find(collection, { author: "finn" })

Package Sidebar

Install

npm i @cognica/client

Homepage

cognica.io

Weekly Downloads

13

Version

0.1.9

License

Apache-2.0

Unpacked Size

2.34 MB

Total Files

6

Last publish

Collaborators

  • finn.cognica