Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@singlestore/client

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@singlestore/client - npm Package Compare versions

Comparing version 0.0.33 to 0.0.34

2

package.json
{
"name": "@singlestore/client",
"version": "0.0.33",
"version": "0.0.34",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "sideEffects": false,

# SingleStore Client
The SingleStore Client is a package designed to use SingleStore API in Node.js environments.
The SingleStore Client is a package designed for interacting with the SingleStore API in Node.js environments.

@@ -9,2 +9,15 @@ ## Table of Contents

- [Usage Examples](#usage-examples)
- [Create an Instance](#create-an-instance)
- [Connect to a Workspace](#connect-to-a-workspace)
- [Create a Database](#create-a-database)
- [Use a Database](#use-a-database)
- [Create a Table](#create-a-table)
- [Insert Values](#insert-values)
- [Find Values](#find-values)
- [Find Values by a Condition](#find-values-by-a-condition)
- [Update Values by a Condition](#update-values-by-a-condition)
- [Add AI Functionality](#add-ai-functionality)
- [Perform a Vector Search](#perform-a-vector-search)
- [Create a Chat Completion Stream](#create-a-chat-completion-stream)
- [Advanced Usage](#advanced-usage)

@@ -23,2 +36,4 @@ ## Installation

Instantiate the `SingleStoreClient` to interact with the SingleStore.
```ts

@@ -32,2 +47,4 @@ import { SingleStoreClient } from "@singlestore/client";

Connect to a specific workspace using your workspace credentials.
```ts

@@ -43,2 +60,4 @@ const workspace = client.workspace({

Create a new database within the connected workspace.
```ts

@@ -50,2 +69,4 @@ const database = await workspace.createDatabase({ name: "my_database" });

Select and use an existing database.
```ts

@@ -57,2 +78,4 @@ const database = await workspace.database("my_database");

Create a table within the selected database with specified columns and attributes.
```ts

@@ -71,2 +94,4 @@ const usersTable = await database.createTable({

Insert multiple records into a table.
```ts

@@ -81,2 +106,4 @@ await usersTable.insert([

Retrieve all records from a table.
```ts

@@ -88,2 +115,4 @@ const users = await usersTable.find();

Retrieve records that match specific conditions.
```ts

@@ -95,2 +124,4 @@ const admins = await usersTable.find({ where: { role: "admin" } });

Update records that meet certain conditions.
```ts

@@ -102,2 +133,4 @@ await usersTable.update({ role: "admin" }, { name: "User 2" });

Integrate AI capabilities using the SingleStore AI package.
```ts

@@ -113,3 +146,3 @@ import { AI } from "@singlestore/ai";

This method returns found rows.
Execute a vector search on a table to find relevant records.

@@ -123,5 +156,5 @@ ```ts

### Create a Chat Compleiton Stream
### Create a Chat Completion Stream
This method returns a chat completion or a chat completion stream based on the prompt and vector search results.
Generate a chat completion or stream based on prompt and vector search results.

@@ -140,4 +173,6 @@ ```ts

### Advanced
### Advanced Usage
A more complex example demonstrating advanced queries and table joins.
```ts

@@ -144,0 +179,0 @@ interface StoreDatabase {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc