@aicore/cocodb-ws-client
Advanced tools
Comparing version 1.0.15 to 1.0.16
{ | ||
"name": "@aicore/cocodb-ws-client", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Websocket client for cocoDb", | ||
@@ -62,3 +62,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"@aicore/libcommonutils": "1.0.19", | ||
"@aicore/libcommonutils": "1.0.20", | ||
"ws": "8.13.0" | ||
@@ -65,0 +65,0 @@ }, |
@@ -28,2 +28,3 @@ /* | ||
deleteDocument, | ||
deleteDocuments, | ||
deleteDb, | ||
@@ -84,2 +85,2 @@ getFromIndex, | ||
* @module @aicore/cocodb-ws-client | ||
*/ | ||
*/ |
@@ -245,2 +245,28 @@ import {sendMessage} from "./client.js"; | ||
/** | ||
* > This function deletes all documents satisfying query condition from a table | ||
* @param {string} tableName - The name of the table in which the key is to be deleted. | ||
* @param {string} queryString - The cocDB query string. | ||
* @param {Array[string]} useIndexForFields - List of indexed fields in the document. | ||
* @returns {Promise} A promise. | ||
*/ | ||
export function deleteDocuments(tableName, queryString, useIndexForFields = []) { | ||
if (isStringEmpty(tableName)) { | ||
throw new Error('Please provide valid table name'); | ||
} | ||
if (isStringEmpty(queryString)) { | ||
throw new Error('Please provide valid queryString'); | ||
} | ||
return sendMessage( | ||
{ | ||
fn: COCO_DB_FUNCTIONS.deleteDocuments, | ||
request: { | ||
tableName, | ||
queryString, | ||
useIndexForFields | ||
} | ||
}); | ||
} | ||
/** | ||
* > This function deletes a table from the database | ||
@@ -247,0 +273,0 @@ * @param {string} tableName - The name of the table to delete. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74700
754
+ Added@aicore/libcommonutils@1.0.20(transitive)
- Removed@aicore/libcommonutils@1.0.19(transitive)