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

@aicore/cocodb-ws-client

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aicore/cocodb-ws-client - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

4

package.json
{
"name": "@aicore/cocodb-ws-client",
"version": "1.0.6",
"version": "1.0.7",
"description": "Websocket client for cocoDb",

@@ -62,3 +62,3 @@ "main": "src/index.js",

"dependencies": {
"@aicore/libcommonutils": "1.0.18",
"@aicore/libcommonutils": "1.0.19",
"ws": "8.9.0"

@@ -65,0 +65,0 @@ },

import {sendMessage} from "./client.js";
export {init, close} from "./client.js";
import {COCO_DB_FUNCTIONS, isObjectEmpty, isStringEmpty} from "@aicore/libcommonutils";
import {COCO_DB_FUNCTIONS, isObjectEmpty, isString, isStringEmpty} from "@aicore/libcommonutils";

@@ -304,1 +304,37 @@ // @INCLUDE_IN_API_DOCS

}
/**
* It queries the database for a given table name and query string.
* @param {string} tableName - The name of the table you want to query.
* @param {string} queryString - The query string to be executed.
* @param {Array<string>}[useIndexForFields=null] - This is an array of fields that you want to use the index for.
* @returns {Promise}A promise
*/
export function query(tableName, queryString, useIndexForFields = null) {
if (isStringEmpty(tableName)) {
throw new Error('Please provide valid table name');
}
if (!isString(queryString) || isStringEmpty(queryString)) {
throw new Error('Please provide valid query String');
}
if (!useIndexForFields) {
return sendMessage(
{
fn: COCO_DB_FUNCTIONS.query,
request: {
tableName: tableName,
queryString: queryString
}
});
}
return sendMessage(
{
fn: COCO_DB_FUNCTIONS.query,
request: {
tableName: tableName,
queryString: queryString,
useIndexForFields: useIndexForFields
}
});
}
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