Skip to content

johnsmartco/astra-db-ts

 
 

Repository files navigation

@datastax/astra-db-ts

astra-db-ts is a TypeScript client for interacting with DataStax Astra DB.

Getting Started

import { AstraDB } from "@datastax/astra-db-ts";

const { TOKEN, DATABASE_ID, REGION, COLLECTION_NAME, ENDPOINT } = process.env;

const astraDb = new AstraDB(TOKEN, DATABASE_ID, REGION);
// or...
// const astraDb = new AstraDB(TOKEN, ENDPOINT);

// Create a collection
const collection = await astraDb.collection(COLLECTION_NAME);

// Return the number of documents in the collection
const results = await collection.countDocuments();

About

Typescript client for Astra DB Vector

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.8%
  • Other 0.2%