/** * CapacitorSQLitePlugin Interface */ export interface CapacitorSQLitePlugin { /** * Initialize the web store * * @return Promise * @since 3.2.3-1 */ initWebStore(): Promise; /** * Save database to the web store * * @param options: capSQLiteOptions * @return Promise * @since 3.2.3-1 */ saveToStore(options: capSQLiteOptions): Promise; /** * Get database from local disk and save it to store * * @param options: capSQLiteLocalDiskOptions * @return Promise * @since 4.6.3 */ getFromLocalDiskToStore(options: capSQLiteLocalDiskOptions): Promise; /** * Save database to local disk * * @param options: capSQLiteOptions * @return Promise * @since 4.6.3 */ saveToLocalDisk(options: capSQLiteOptions): Promise; /** * Check if a passphrase exists in a secure store * * @return Promise * @since 3.0.0-beta.13 */ isSecretStored(): Promise; /** * Store a passphrase in a secure store * Update the secret of previous encrypted databases with GlobalSQLite * !!! Only to be used once if you wish to encrypt database !!! * * @param options capSetSecretOptions * @return Promise * @since 3.0.0-beta.13 */ setEncryptionSecret(options: capSetSecretOptions): Promise; /** * Change the passphrase in a secure store * Update the secret of previous encrypted databases with passphrase * in secure store * * @param options capChangeSecretOptions * @return Promise * @since 3.0.0-beta.13 */ changeEncryptionSecret(options: capChangeSecretOptions): Promise; /** * Clear the passphrase in the secure store * * @return Promise * @since 3.5.1 */ clearEncryptionSecret(): Promise; /** * Check encryption passphrase * * @return Promise * @since 4.6.1 */ checkEncryptionSecret(options: capSetSecretOptions): Promise; /** * create a database connection * @param options capConnectionOptions * @return Promise * @since 2.9.0 refactor */ createConnection(options: capConnectionOptions): Promise; /** * close a database connection * @param options capSQLiteOptions * @return Promise * @since 2.9.0 refactor */ closeConnection(options: capSQLiteOptions): Promise; /** * Echo a given string * * @param options: capEchoOptions * @return Promise * @since 0.0.1 */ echo(options: capEchoOptions): Promise; /** * Opens a SQLite database. * Attention: This re-opens a database if it's already open! * * @param options: capSQLiteOptions * @returns Promise * @since 0.0.1 */ open(options: capSQLiteOptions): Promise; /** * Close a SQLite database * @param options: capSQLiteOptions * @returns Promise * @since 0.0.1 */ close(options: capSQLiteOptions): Promise; /** * Begin Database Transaction * @param options * @returns capSQLiteChanges * @since 5.0.7 */ beginTransaction(options: capSQLiteOptions): Promise; /** * Commit Database Transaction * @param options * @returns capSQLiteChanges * @since 5.0.7 */ commitTransaction(options: capSQLiteOptions): Promise; /** * Rollback Database Transaction * @param options * @returns capSQLiteChanges * @since 5.0.7 */ rollbackTransaction(options: capSQLiteOptions): Promise; /** * Is Database Transaction Active * @param options * @returns capSQLiteResult * @since 5.0.7 */ isTransactionActive(options: capSQLiteOptions): Promise; /** * Load a SQlite extension * @param options :capSQLiteExtensionPath * @returns Promise * @since 5.0.6 */ /** * Enable Or Disable Extension Loading * @param options * @returns Promise * @since 5.0.6 */ /** * GetUrl get the database Url * @param options: capSQLiteOptions * @returns Promise * @since 3.3.3-4 */ getUrl(options: capSQLiteOptions): Promise; /** * Get a SQLite database version * @param options: capSQLiteOptions * @returns Promise * @since 3.2.0 */ getVersion(options: capSQLiteOptions): Promise; /** * Execute a Batch of Raw Statements as String * @param options: capSQLiteExecuteOptions * @returns Promise * @since 0.0.1 */ execute(options: capSQLiteExecuteOptions): Promise; /** * Execute a Set of Raw Statements as Array of CapSQLiteSet * @param options: capSQLiteSetOptions * @returns Promise * @since 2.2.0-2 */ executeSet(options: capSQLiteSetOptions): Promise; /** * Execute a Single Statement * @param options: capSQLiteRunOptions * @returns Promise * @since 0.0.1 */ run(options: capSQLiteRunOptions): Promise; /** * Query a Single Statement * @param options: capSQLiteQueryOptions * @returns Promise * @since 0.0.1 */ query(options: capSQLiteQueryOptions): Promise; /** * Check if a SQLite database exists with opened connection * @param options: capSQLiteOptions * @returns Promise * @since 2.0.1-1 */ isDBExists(options: capSQLiteOptions): Promise; /** * Check if a SQLite database is opened * @param options: capSQLiteOptions * @returns Promise * @since 3.0.0-beta.5 */ isDBOpen(options: capSQLiteOptions): Promise; /** * Check if a SQLite database is encrypted * @param options: capSQLiteOptions * @returns Promise * @since 4.6.2-2 */ isDatabaseEncrypted(options: capSQLiteOptions): Promise; /** * Check encryption value in capacitor.config * @returns Promise * @since 4.6.2-2 */ isInConfigEncryption(): Promise; /** * Check encryption value in capacitor.config * @returns Promise * @since 4.6.2-2 */ isInConfigBiometricAuth(): Promise; /** * Check if a SQLite database exists without connection * @param options: capSQLiteOptions * @returns Promise * @since 3.0.0-beta.5 */ isDatabase(options: capSQLiteOptions): Promise; /** * Check if a table exists in a SQLite database * @param options: capSQLiteTableOptions * @returns Promise * @since 3.0.0-beta.5 */ isTableExists(options: capSQLiteTableOptions): Promise; /** * Delete a SQLite database * @param options: capSQLiteOptions * @returns Promise * @since 0.0.1 */ deleteDatabase(options: capSQLiteOptions): Promise; /** * Is Json Object Valid * @param options: capSQLiteImportOptions * @returns Promise * @since 2.0.1-1 */ isJsonValid(options: capSQLiteImportOptions): Promise; /** * Import from Json Object * @param options: capSQLiteImportOptions * @returns Promise * @since 2.0.0-3 */ importFromJson(options: capSQLiteImportOptions): Promise; /** * Export to Json Object * @param options: capSQLiteExportOptions * @returns Promise * @since 2.0.1-1 */ exportToJson(options: capSQLiteExportOptions): Promise; /** * Create a synchronization table * @param options: capSQLiteOptions * @returns Promise * @since 2.0.1-1 */ createSyncTable(options: capSQLiteOptions): Promise; /** * Set the synchronization date * @param options: capSQLiteSyncDateOptions * @returns Promise * @since 2.0.1-1 */ setSyncDate(options: capSQLiteSyncDateOptions): Promise; /** * Get the synchronization date * @param options: capSQLiteOptions * @returns Promise * @since 2.9.0 */ getSyncDate(options: capSQLiteOptions): Promise; /** * Remove rows with sql_deleted = 1 after an export * @param options * @returns Promise * @since 3.4.3-2 */ deleteExportedRows(options: capSQLiteOptions): Promise; /** * Add the upgrade Statement for database version upgrading * @param options: capSQLiteUpgradeOptions * @returns Promise * @since 2.4.2-6 iOS & Electron 2.4.2-7 Android */ addUpgradeStatement(options: capSQLiteUpgradeOptions): Promise; /** * Copy databases from public/assets/databases folder to application databases folder * @param options: capSQLiteFromAssets since 3.2.5-2 * @returns Promise * @since 2.9.0 refactor */ copyFromAssets(options: capSQLiteFromAssetsOptions): Promise; /** * Get database or zipped database(s) from url * @param options: capSQLiteHTTPOptions * @returns Promise * @since 4.1.1 */ getFromHTTPRequest(options: capSQLiteHTTPOptions): Promise; /** * Get the database list * @returns Promise * @since 3.0.0-beta.5 */ getDatabaseList(): Promise; /** * Get the database's table list * @param options * @returns Promise * @since 3.4.2-3 */ getTableList(options: capSQLiteOptions): Promise; /** * Get the Migratable database list * @param options: capSQLitePathOptions // only iOS & Android since 3.2.4-2 * @returns Promise * @since 3.0.0-beta.5 */ getMigratableDbList(options: capSQLitePathOptions): Promise; /** * Add SQLIte Suffix to existing databases * @param options: capSQLitePathOptions * @returns Promise * @since 3.0.0-beta.5 */ addSQLiteSuffix(options: capSQLitePathOptions): Promise; /** * Delete Old Cordova databases * @param options: capSQLitePathOptions * @returns Promise * @since 3.0.0-beta.5 */ deleteOldDatabases(options: capSQLitePathOptions): Promise; /** * Moves databases to the location the plugin can read them, and adds sqlite suffix * This resembles calling addSQLiteSuffix and deleteOldDatabases, but it is more performant as it doesn't copy but moves the files * @param options: capSQLitePathOptions */ moveDatabasesAndAddSuffix(options: capSQLitePathOptions): Promise; /** * Check Connection Consistency JS <=> Native * return true : consistency, connections are opened * return false : no consistency, connections are closed * @param options: capAllConnectionsOptions * @returns Promise * @since 3.0.0-beta.11 */ checkConnectionsConsistency(options: capAllConnectionsOptions): Promise; /** * get a non conformed database path * @param options capNCDatabasePathOptions * @return Promise * @since 3.3.3-1 */ getNCDatabasePath(options: capNCDatabasePathOptions): Promise; /** * create a non conformed database connection * @param options capNCConnectionOptions * @return Promise * @since 3.3.3-1 */ createNCConnection(options: capNCConnectionOptions): Promise; /** * close a non conformed database connection * @param options capNCOptions * @return Promise * @since 3.3.3-1 */ closeNCConnection(options: capNCOptions): Promise; /** * Check if a non conformed database exists without connection * @param options: capNCOptions * @returns Promise * @since 3.3.3-1 */ isNCDatabase(options: capNCOptions): Promise; } export interface capSetSecretOptions { /** * The passphrase for Encrypted Databases */ passphrase?: string; } export interface capChangeSecretOptions { /** * The new passphrase for Encrypted Databases */ passphrase?: string; /** * The old passphrase for Encrypted Databases */ oldpassphrase?: string; } export interface capEchoOptions { /** * String to be echoed */ value?: string; } export interface capSQLiteExtensionPath { /** * The database name */ database?: string; /** * The extension path */ path?: string; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; } export interface capSQLiteExtensionEnable { /** * The database name */ database?: string; /** * The enabling toggle (1: ON, 0: OFF) */ toggle?: boolean; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; } export interface capConnectionOptions { /** * The database name */ database?: string; /** * The database version */ version?: number; /** * Set to true (database encryption) / false */ encrypted?: boolean; /** * Set the mode for database encryption * ["encryption", "secret", "newsecret"] */ mode?: string; /** * Set to true (database in read-only mode) / false */ readonly?: boolean; } export interface capAllConnectionsOptions { /** * the dbName of all connections * @since 3.0.0-beta.10 */ dbNames?: string[]; /** * the openMode ("RW" read&write, "RO" readonly) of all connections * @since 4.1.0 */ openModes?: string[]; } export interface capSQLiteOptions { /** * The database name */ database?: string; /** * Set to true (database in read-only mode) / false */ readonly?: boolean; } export interface capNCDatabasePathOptions { /** * the database path */ path?: string; /** * The database name */ database?: string; } export interface capNCConnectionOptions { /** * The database path */ databasePath?: string; /** * The database version */ version?: number; } export interface capNCOptions { /** * The database path */ databasePath?: string; } export interface capSQLiteExecuteOptions { /** * The database name */ database?: string; /** * The batch of raw SQL statements as string */ statements?: string; /** * Enable / Disable transactions * default Enable (true) * @since 3.0.0-beta.10 */ transaction?: boolean; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; /** * Compatibility SQL92 * !!! ELECTRON ONLY * default (true) * @since 5.0.7 */ isSQL92?: boolean; } export interface capSQLiteSetOptions { /** * The database name */ database?: string; /** * The batch of raw SQL statements as Array of capSQLLiteSet */ set?: capSQLiteSet[]; /** * Enable / Disable transactions * default Enable (true) * @since 3.0.0-beta.10 */ transaction?: boolean; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; /** * return mode * default 'no' * value 'all' * value 'one' for Electron platform * @since 5.0.5-3 */ returnMode?: string; /** * Compatibility SQL92 * !!! ELECTRON ONLY * default (true) * @since 5.0.7 */ isSQL92?: boolean; } export interface capSQLiteRunOptions { /** * The database name */ database?: string; /** * A statement */ statement?: string; /** * A set of values for a statement */ values?: any[]; /** * Enable / Disable transactions * default Enable (true) * @since 3.0.0-beta.10 */ transaction?: boolean; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; /** * return mode * default 'no' * value 'all' * value 'one' for Electron platform * @since 5.0.5-3 */ returnMode?: string; /** * Compatibility SQL92 * !!! ELECTRON ONLY * default (true) * @since 5.0.7 */ isSQL92?: boolean; } export interface capSQLiteQueryOptions { /** * The database name */ database?: string; /** * A statement */ statement?: string; /** * A set of values for a statement * Change to any[] * @since 3.0.0-beta.11 */ values?: any[]; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; /** * Compatibility SQL92 * !!! ELECTRON ONLY * default (true) * @since 5.0.7 */ isSQL92?: boolean; } export interface capTask { /** * define task for executeTransaction * @since 5.6.3 */ /** * A SQLite statement */ statement: string; /** * A set of values to bind to the statement (optional) */ values?: any[]; } export interface capSQLiteImportOptions { /** * Set the JSON object to import * */ jsonstring?: string; } export interface capSQLiteExportOptions { /** * The database name */ database?: string; /** * Set the mode to export JSON Object: * "full" or "partial" * */ jsonexportmode?: string; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; /** * Encrypted * When your database is encrypted * Choose the export Json Object * Encrypted (true) / Unencrypted (false) * default false * @since 5.0.8 */ encrypted?: boolean; } export interface capSQLiteFromAssetsOptions { /** * Set the overwrite mode for the copy from assets * "true"/"false" default to "true" * */ overwrite?: boolean; } export interface capSQLiteLocalDiskOptions { /** * Set the overwrite mode for saving the database from local disk to store * "true"/"false" default to "true" * */ overwrite?: boolean; } export interface capSQLiteHTTPOptions { /** * The url of the database or the zipped database(s) */ url?: string; /** * Set the overwrite mode for the copy from assets * "true"/"false" default to "true" * */ overwrite?: boolean; } export interface capSQLiteSyncDateOptions { /** * The database name */ database?: string; /** * Set the synchronization date * Format yyyy-MM-dd'T'HH:mm:ss.SSSZ */ syncdate?: string; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; } export interface capSQLiteSet { /** * A statement */ statement?: string; /** * the data values list as an Array */ values?: any[]; } export interface capSQLiteUpgradeOptions { /** * The database name */ database?: string; /** * The upgrade options for version upgrade * Array of length 1 to easiest the iOS plugin */ upgrade?: capSQLiteVersionUpgrade[]; } export interface capSQLitePathOptions { /** * The folder path of existing databases * If not given folder path is "default" */ folderPath?: string; /** * The database name's list to be copied and/or deleted * since 3.2.4-1 * If not given all databases in the specify folder path */ dbNameList?: string[]; } export interface capSQLiteTableOptions { /** * The database name */ database?: string; /** * The table name */ table?: string; /** * ReadOnly / ReadWrite * default ReadWrite (false) * @since 4.1.0-7 */ readonly?: boolean; } export interface capEchoResult { /** * String returned */ value?: string; } export interface capNCDatabasePathResult { /** * String returned */ path?: string; } export interface capVersionResult { /** * Number returned */ version?: number; } export interface capSQLiteResult { /** * result set to true when successful else false */ result?: boolean; } export interface capSQLiteUrl { /** * a returned url */ url?: string; } export interface capSQLiteChanges { /** * a returned Changes */ changes?: Changes; } export interface Changes { /** * the number of changes from an execute or run command */ changes?: number; /** * the lastId created from a run command */ lastId?: number; /** * values when RETURNING */ values?: any[]; } export interface capSQLiteValues { /** * the data values list as an Array * iOS the first row is the returned ios_columns name list */ values?: any[]; } export interface DBSQLiteValues { /** * the data values list as an Array */ values?: any[]; } export interface capSQLiteJson { /** * an export JSON object */ export?: JsonSQLite; } export interface capSQLiteSyncDate { /** * the synchronization date */ syncDate?: number; } export interface EncryptJson { /** * The encrypted JsonSQLite base64 string */ expData: string; } export interface JsonSQLite { /** * The database name */ database: string; /** * The database version */ version: number; /** * Delete the database prior to import (default false) */ overwrite?: boolean; /** * Set to true (database encryption) / false */ encrypted: boolean; /*** * Set the mode * ["full", "partial"] */ mode: string; /*** * Array of Table (JsonTable) */ tables: JsonTable[]; /*** * Array of View (JsonView) */ views?: JsonView[]; } export interface JsonTable { /** * The database name */ name: string; /*** * Array of Schema (JsonColumn) */ schema?: JsonColumn[]; /*** * Array of Index (JsonIndex) */ indexes?: JsonIndex[]; /*** * Array of Trigger (JsonTrigger) */ triggers?: JsonTrigger[]; /*** * Array of Table data */ values?: any[][]; } export interface JsonColumn { /** * The column name */ column?: string; /** * The column data (type, unique, ...) */ value: string; /** * The column foreign key constraints */ foreignkey?: string; /** * the column constraint */ constraint?: string; } export interface JsonTrigger { /** * The trigger name */ name: string; /** * The trigger time event fired */ timeevent: string; /** * The trigger condition */ condition?: string; /** * The logic of the trigger */ logic: string; } export interface JsonIndex { /** * The index name */ name: string; /** * The value of the index can have the following formats: * email * email ASC * email, MobileNumber * email ASC, MobileNumber DESC */ value: string; /** * the mode (Optional) * UNIQUE */ mode?: string; } export interface JsonView { /** * The view name */ name: string; /** * The view create statement */ value: string; } export interface capBiometricListener { /** * Biometric ready */ result: boolean; message: string; } export interface capJsonProgressListener { /** * Progress message */ progress?: string; } export interface capHttpRequestEndedListener { /** * Message */ message?: string; } export interface capPickOrSaveDatabaseEndedListener { /** * Pick Database's name */ db_name?: string; /** * Message */ message?: string; } export interface capSQLiteVersionUpgrade { toVersion: number; statements: string[]; } /** * SQLiteConnection Interface */ export interface ISQLiteConnection { /** * Init the web store * @returns Promise * @since 3.2.3-1 */ initWebStore(): Promise; /** * Save the datbase to the web store * @param database * @returns Promise * @since 3.2.3-1 */ saveToStore(database: string): Promise; /** * Get database from local disk and save it to store * * @param overwrite: boolean * @return Promise * @since 4.6.3 */ getFromLocalDiskToStore(overwrite: boolean): Promise; /** * Save database to local disk * * @param database: string * @return Promise * @since 4.6.3 */ saveToLocalDisk(database: string): Promise; /** * Echo a value * @param value * @returns Promise * @since 2.9.0 refactor */ echo(value: string): Promise; /** * Check if a secret is stored * @returns Promise * @since 3.0.0-beta.13 */ isSecretStored(): Promise; /** * Set a passphrase in a secure store * @param passphrase * @returns Promise * @since 3.0.0-beta.13 */ setEncryptionSecret(passphrase: string): Promise; /** * Change the passphrase in a secure store * @param passphrase * @param oldpassphrase * @returns Promise * @since 3.0.0-beta.13 */ changeEncryptionSecret(passphrase: string, oldpassphrase: string): Promise; /** * Clear the passphrase in a secure store * @returns Promise * @since 3.5.1 */ clearEncryptionSecret(): Promise; /** * Check the passphrase stored in a secure store * @param oldPassphrase * @returns Promise * @since 4.6.1 */ checkEncryptionSecret(passphrase: string): Promise; /** * Add the upgrade Statement for database version upgrading * @param database * @param upgrade @since 5.6.4 * @returns Promise * @since 2.9.0 refactor */ addUpgradeStatement(database: string, upgrade: capSQLiteVersionUpgrade[]): Promise; /** * Create a connection to a database * @param database * @param encrypted * @param mode * @param version * @param readonly * @returns Promise * @since 2.9.0 refactor */ createConnection(database: string, encrypted: boolean, mode: string, version: number, readonly: boolean): Promise; /** * Check if a connection exists * @param database * @param readonly * @returns Promise * @since 3.0.0-beta.5 */ isConnection(database: string, readonly: boolean): Promise; /** * Retrieve an existing database connection * @param database * @param readonly * @returns Promise * @since 2.9.0 refactor */ retrieveConnection(database: string, readonly: boolean): Promise; /** * Retrieve all database connections * @returns Promise> * @since 2.9.0 refactor */ retrieveAllConnections(): Promise>; /** * Close a database connection * @param database * @param readonly * @returns Promise * @since 2.9.0 refactor */ closeConnection(database: string, readonly: boolean): Promise; /** * Close all database connections * @returns Promise * @since 2.9.0 refactor */ closeAllConnections(): Promise; /** * Check the consistency between Js Connections * and Native Connections * if inconsistency all connections are removed * @returns Promise * @since 3.0.0-beta.10 */ checkConnectionsConsistency(): Promise; /** * get a non-conformed database path * @param path * @param database * @returns Promise * @since 3.3.3-1 */ getNCDatabasePath(path: string, database: string): Promise; /** * Create a non-conformed database connection * @param databasePath * @param version * @returns Promise * @since 3.3.3-1 */ createNCConnection(databasePath: string, version: number): Promise; /** * Close a non-conformed database connection * @param databasePath * @returns Promise * @since 3.3.3-1 */ closeNCConnection(databasePath: string): Promise; /** * Check if a non-conformed databaseconnection exists * @param databasePath * @returns Promise * @since 3.3.3-1 */ isNCConnection(databasePath: string): Promise; /** * Retrieve an existing non-conformed database connection * @param databasePath * @returns Promise * @since 3.3.3-1 */ retrieveNCConnection(databasePath: string): Promise; /** * Import a database From a JSON * @param jsonstring string * @returns Promise * @since 2.9.0 refactor */ importFromJson(jsonstring: string): Promise; /** * Check the validity of a JSON Object * @param jsonstring string * @returns Promise * @since 2.9.0 refactor */ isJsonValid(jsonstring: string): Promise; /** * Copy databases from public/assets/databases folder to application databases folder * @param overwrite since 3.2.5-2 * @returns Promise * @since 2.9.0 refactor */ copyFromAssets(overwrite?: boolean): Promise; /** * * @param url * @param overwrite * @returns Promise * @since 4.1.1 */ getFromHTTPRequest(url?: string, overwrite?: boolean): Promise; /** * Check if a SQLite database is encrypted * @param options: capSQLiteOptions * @returns Promise * @since 4.6.2-2 */ isDatabaseEncrypted(database: string): Promise; /** * Check encryption value in capacitor.config * @returns Promise * @since 4.6.2-2 */ isInConfigEncryption(): Promise; /** * Check encryption value in capacitor.config * @returns Promise * @since 4.6.2-2 */ isInConfigBiometricAuth(): Promise; /** * Check if a database exists * @param database * @returns Promise * @since 3.0.0-beta.5 */ isDatabase(database: string): Promise; /** * Check if a non conformed database exists * @param databasePath * @returns Promise * @since 3.3.3-1 */ isNCDatabase(databasePath: string): Promise; /** * Get the database list * @returns Promise * @since 3.0.0-beta.5 */ getDatabaseList(): Promise; /** * Get the Migratable database list * @param folderPath: string // only iOS & Android since 3.2.4-2 * @returns Promise * @since 3.0.0-beta.5 */ getMigratableDbList(folderPath?: string): Promise; /** * Add SQLIte Suffix to existing databases * @param folderPath * @param dbNameList since 3.2.4-1 * @returns Promise * @since 3.0.0-beta.5 */ addSQLiteSuffix(folderPath?: string, dbNameList?: string[]): Promise; /** * Delete Old Cordova databases * @param folderPath * @param dbNameList since 3.2.4-1 * @returns Promise * @since 3.0.0-beta.5 */ deleteOldDatabases(folderPath?: string, dbNameList?: string[]): Promise; /** * Moves databases to the location the plugin can read them, and adds sqlite suffix * This resembles calling addSQLiteSuffix and deleteOldDatabases, but it is more performant as it doesn't copy but moves the files * @param folderPath the origin from where to move the databases * @param dbNameList the names of the databases to move, check out the getMigratableDbList to get a list, an empty list will result in copying all the databases with '.db' extension. */ moveDatabasesAndAddSuffix(folderPath?: string, dbNameList?: string[]): Promise; } /** * SQLiteConnection Class */ export declare class SQLiteConnection implements ISQLiteConnection { private sqlite; private _connectionDict; constructor(sqlite: any); initWebStore(): Promise; saveToStore(database: string): Promise; saveToLocalDisk(database: string): Promise; getFromLocalDiskToStore(overwrite?: boolean): Promise; echo(value: string): Promise; isSecretStored(): Promise; setEncryptionSecret(passphrase: string): Promise; changeEncryptionSecret(passphrase: string, oldpassphrase: string): Promise; clearEncryptionSecret(): Promise; checkEncryptionSecret(passphrase: string): Promise; addUpgradeStatement(database: string, upgrade: capSQLiteVersionUpgrade[]): Promise; createConnection(database: string, encrypted: boolean, mode: string, version: number, readonly: boolean): Promise; closeConnection(database: string, readonly: boolean): Promise; isConnection(database: string, readonly: boolean): Promise; retrieveConnection(database: string, readonly: boolean): Promise; getNCDatabasePath(path: string, database: string): Promise; createNCConnection(databasePath: string, version: number): Promise; closeNCConnection(databasePath: string): Promise; isNCConnection(databasePath: string): Promise; retrieveNCConnection(databasePath: string): Promise; isNCDatabase(databasePath: string): Promise; retrieveAllConnections(): Promise>; closeAllConnections(): Promise; checkConnectionsConsistency(): Promise; importFromJson(jsonstring: string): Promise; isJsonValid(jsonstring: string): Promise; copyFromAssets(overwrite?: boolean): Promise; getFromHTTPRequest(url: string, overwrite?: boolean): Promise; isDatabaseEncrypted(database: string): Promise; isInConfigEncryption(): Promise; isInConfigBiometricAuth(): Promise; isDatabase(database: string): Promise; getDatabaseList(): Promise; getMigratableDbList(folderPath?: string): Promise; addSQLiteSuffix(folderPath?: string, dbNameList?: string[]): Promise; deleteOldDatabases(folderPath?: string, dbNameList?: string[]): Promise; moveDatabasesAndAddSuffix(folderPath?: string, dbNameList?: string[]): Promise; } /** * SQLiteDBConnection Interface */ export interface ISQLiteDBConnection { /** * Get SQLite DB Connection DB name * @returns string * @since 2.9.0 refactor */ getConnectionDBName(): string; /** * Get SQLite DB Connection read-only mode * @returns boolean * @since 4.1.0 */ getConnectionReadOnly(): boolean; /** * Open a SQLite DB Connection * @returns Promise * @since 2.9.0 refactor */ open(): Promise; /** * Close a SQLite DB Connection * @returns Promise * @since 2.9.0 refactor */ close(): Promise; /** * Begin Database Transaction * @returns capSQLiteChanges * @since 5.0.7 */ beginTransaction(): Promise; /** * Commit Database Transaction * @returns capSQLiteChanges * @since 5.0.7 */ commitTransaction(): Promise; /** * Rollback Database Transaction * @returns capSQLiteChanges * @since 5.0.7 */ rollbackTransaction(): Promise; /** * Is Database Transaction Active * @returns capSQLiteResult * @since 5.0.7 */ isTransactionActive(): Promise; /** * Get Database Url * @returns Promise * @since 3.3.3-4 */ getUrl(): Promise; /** * Get the a SQLite DB Version * @returns Promise * @since 3.2.0 */ getVersion(): Promise; /** * Load a SQlite extension * @param path :SQlite extension path * @returns Promise * @since 5.0.6 */ loadExtension(path: string): Promise; /** * Enable Or Disable Extension Loading * @param toggle true:on false:off * @returns Promise * @since 5.0.6 */ enableLoadExtension(toggle: boolean): Promise; /** * Execute SQLite DB Connection Statements * @param statements * @param transaction (optional) * @param isSQL92 (optional) * @returns Promise * @since 2.9.0 refactor */ execute(statements: string, transaction?: boolean, isSQL92?: boolean): Promise; /** * Execute SQLite DB Connection Query * @param statement * @param values (optional) * @param isSQL92 (optional) * @returns Promise * @since 2.9.0 refactor */ query(statement: string, values?: any[], isSQL92?: boolean): Promise; /** * Execute SQLite DB Connection Raw Statement * @param statement * @param values (optional) * @param transaction (optional) * @param returnMode (optional) * @param isSQL92 (optional) * @returns Promise * @since 2.9.0 refactor */ run(statement: string, values?: any[], transaction?: boolean, returnMode?: string, isSQL92?: boolean): Promise; /** * Execute SQLite DB Connection Set * @param set * @param transaction (optional) * @param returnMode (optional) * @param isSQL92 (optional) * @returns Promise * @since 2.9.0 refactor */ executeSet(set: capSQLiteSet[], transaction?: boolean, returnMode?: string, isSQL92?: boolean): Promise; /** * Check if a SQLite DB Connection exists * @returns Promise * @since 2.9.0 refactor */ isExists(): Promise; /** * Check if a SQLite database is opened * @returns Promise * @since 3.0.0-beta.5 */ isDBOpen(): Promise; /** * Check if a table exists * @returns Promise * @since 3.0.0-beta.5 */ isTable(table: string): Promise; /** * Get database's table list * @since 3.4.2-3 */ getTableList(): Promise; /** * Delete a SQLite DB Connection * @returns Promise * @since 2.9.0 refactor */ delete(): Promise; /** * Create a synchronization table * @returns Promise * @since 2.9.0 refactor */ createSyncTable(): Promise; /** * Set the synchronization date * @param syncdate * @returns Promise * @since 2.9.0 refactor */ setSyncDate(syncdate: string): Promise; /** * Get the synchronization date * @returns Promise * @since 2.9.0 refactor */ getSyncDate(): Promise; /** * Export the given database to a JSON Object * @param mode * @param encrypted (optional) since 5.0.8 not for Web platform * @returns Promise * @since 2.9.0 refactor */ exportToJson(mode: string, encrypted?: boolean): Promise; /** * Remove rows with sql_deleted = 1 after an export * @returns Promise * @since 3.4.3-2 */ deleteExportedRows(): Promise; /** * * @param txn * @param isSQL92 * @returns Promise since 5.0.7 * @since 3.4.0 */ executeTransaction(txn: capTask[], isSQL92: boolean): Promise; } /** * SQLiteDBConnection Class */ export declare class SQLiteDBConnection implements ISQLiteDBConnection { private dbName; private readonly; private sqlite; constructor(dbName: string, readonly: boolean, sqlite: any); getConnectionDBName(): string; getConnectionReadOnly(): boolean; open(): Promise; close(): Promise; beginTransaction(): Promise; commitTransaction(): Promise; rollbackTransaction(): Promise; isTransactionActive(): Promise; loadExtension(path: string): Promise; enableLoadExtension(toggle: boolean): Promise; getUrl(): Promise; getVersion(): Promise; getTableList(): Promise; execute(statements: string, transaction?: boolean, isSQL92?: boolean): Promise; query(statement: string, values?: any[], isSQL92?: boolean): Promise; run(statement: string, values?: any[], transaction?: boolean, returnMode?: string, isSQL92?: boolean): Promise; executeSet(set: capSQLiteSet[], transaction?: boolean, returnMode?: string, isSQL92?: boolean): Promise; isExists(): Promise; isTable(table: string): Promise; isDBOpen(): Promise; delete(): Promise; createSyncTable(): Promise; setSyncDate(syncdate: string): Promise; getSyncDate(): Promise; exportToJson(mode: string, encrypted?: boolean): Promise; deleteExportedRows(): Promise; executeTransaction(txn: capTask[], isSQL92?: boolean): Promise; private reorderRows; }