@saltcorn/sqlite-mobile
Advanced tools
Comparing version 0.8.5-beta.2 to 0.8.5-beta.3
@@ -93,2 +93,16 @@ /** | ||
/** | ||
* Add unique constraint | ||
* @param table_name - table name | ||
* @param field_name - column name | ||
* @returns no result | ||
*/ | ||
export declare const add_index: (table_name: string, field_name: string) => Promise<void>; | ||
/** | ||
* Drop index | ||
* @param table_name - table name | ||
* @param field_name - column name | ||
* @returns no results | ||
*/ | ||
export declare const drop_index: (table_name: string, field_name: string) => Promise<void>; | ||
/** | ||
* | ||
@@ -95,0 +109,0 @@ * @returns |
@@ -7,3 +7,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tableExists = exports.listScTables = exports.listUserDefinedTables = exports.listTables = exports.drop_unique_constraint = exports.add_unique_constraint = exports.update = exports.selectOne = exports.selectMaybeOne = exports.deleteWhere = exports.count = exports.drop_reset_schema = exports.select = exports.insert = exports.query = exports.init = exports.setConnectionObject = void 0; | ||
exports.tableExists = exports.listScTables = exports.listUserDefinedTables = exports.listTables = exports.drop_index = exports.add_index = exports.drop_unique_constraint = exports.add_unique_constraint = exports.update = exports.selectOne = exports.selectMaybeOne = exports.deleteWhere = exports.count = exports.drop_reset_schema = exports.select = exports.insert = exports.query = exports.init = exports.setConnectionObject = void 0; | ||
const internal_1 = require("@saltcorn/db-common/internal"); | ||
@@ -173,3 +173,3 @@ const sqlite_commons_1 = require("@saltcorn/db-common/sqlite-commons"); | ||
const add_unique_constraint = async (table_name, field_names) => { | ||
await (0, sqlite_commons_1.do_add_unique_constraint)(table_name, field_names, exports.query); | ||
await (0, sqlite_commons_1.do_add_index)(table_name, field_names, exports.query, true); | ||
}; | ||
@@ -184,6 +184,26 @@ exports.add_unique_constraint = add_unique_constraint; | ||
const drop_unique_constraint = async (table_name, field_names) => { | ||
await (0, sqlite_commons_1.do_drop_unique_constraint)(table_name, field_names, exports.query); | ||
await (0, sqlite_commons_1.do_drop_index)(table_name, field_names, exports.query, true); | ||
}; | ||
exports.drop_unique_constraint = drop_unique_constraint; | ||
/** | ||
* Add unique constraint | ||
* @param table_name - table name | ||
* @param field_name - column name | ||
* @returns no result | ||
*/ | ||
const add_index = async (table_name, field_name) => { | ||
await (0, sqlite_commons_1.do_add_index)(table_name, [field_name], exports.query, false); | ||
}; | ||
exports.add_index = add_index; | ||
/** | ||
* Drop index | ||
* @param table_name - table name | ||
* @param field_name - column name | ||
* @returns no results | ||
*/ | ||
const drop_index = async (table_name, field_name) => { | ||
await (0, sqlite_commons_1.do_drop_index)(table_name, [field_name], exports.query, false); | ||
}; | ||
exports.drop_index = drop_index; | ||
/** | ||
* | ||
@@ -190,0 +210,0 @@ * @returns |
{ | ||
"name": "@saltcorn/sqlite-mobile", | ||
"version": "0.8.5-beta.2", | ||
"version": "0.8.5-beta.3", | ||
"description": "cordova-sqlite-storage structures for Saltcorn, open-source no-code platform", | ||
@@ -29,3 +29,3 @@ "homepage": "https://saltcorn.com", | ||
"dependencies": { | ||
"@saltcorn/db-common": "0.8.5-beta.2" | ||
"@saltcorn/db-common": "0.8.5-beta.3" | ||
}, | ||
@@ -32,0 +32,0 @@ "repository": "github:saltcorn/saltcorn", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
19391
392
+ Added@saltcorn/db-common@0.8.5-beta.3(transitive)
- Removed@saltcorn/db-common@0.8.5-beta.2(transitive)