declare module "@capacitor/core" { interface PluginRegistry { CapacitorSQLite: CapacitorSQLitePlugin; } } export interface CapacitorSQLitePlugin { echo(options: { value: string; }): Promise<{ value: string; }>; /** * Open a SQLite database * @param {capSQLiteOptions} options {database: string, encrypted?: boolean, mode?: string} * @returns {Promise} {result:boolean} */ open(options: capSQLiteOptions): Promise; /** * Close a SQLite database * @param {capSQLiteOptions} options {database: string} * @returns {Promise} {result:boolean} */ close(options: capSQLiteOptions): Promise; /** * Execute a Batch of Raw Statements as String * @param {capSQLiteOptions} options {statements: string} * @returns {Promise} {changes:{changes:number}} */ execute(options: capSQLiteOptions): Promise; /** * Execute a Set of Raw Statements as Array of CapSQLiteSet * @param {capSQLiteOptions} options {set: Array} * @returns {Promise} {changes:{changes:number}} */ executeSet(options: capSQLiteOptions): Promise; /** * Execute a Single Statement * @param {capSQLiteOptions} options {statement: string, values:Array } * @returns {Promise} {changes:{changes:number,lastId:number}} */ run(options: capSQLiteOptions): Promise; /** * Query a Single Statement * @param {capSQLiteOptions} options {statement: string, values:Array } * @returns {Promise} {values:Array} */ query(options: capSQLiteOptions): Promise; /** * Check is a SQLite database exists * @param {capSQLiteOptions} options {database: string} * @returns {Promise} {result:boolean} */ isDBExists(options: capSQLiteOptions): Promise; /** * Delete a SQLite database * @param {capSQLiteOptions} options {database: string} * @returns {Promise} {result:boolean} */ deleteDatabase(options: capSQLiteOptions): Promise; /** * Is Json Object Valid * @param {capSQLiteOptions} options {jsonstring: string} * @returns {Promise} {result:boolean} */ isJsonValid(options: capSQLiteOptions): Promise; /** * Import from Json Object * @param {capSQLiteOptions} options {jsonstring: string} * @returns {Promise} {changes:{changes:number}} */ importFromJson(options: capSQLiteOptions): Promise; /** * Export to Json Object * @param {capSQLiteOptions} options {jsonexportmode: string} * @returns {Promise} {export:any} */ exportToJson(options: capSQLiteOptions): Promise; /** * Create a synchronization table * @returns {Promise} {changes:{changes:number}} */ createSyncTable(): Promise; /** * Set the synchronization date * @param {capSQLiteOptions} options {syncdate: string} * @returns {Promise} {result:boolean} */ setSyncDate(options: capSQLiteOptions): Promise; } export interface capSQLiteOptions { /** * The database name */ database?: string; /** * The batch of raw SQL statements as string */ statements?: string; /** * The batch of raw SQL statements as Array of capSQLLiteSet */ set?: Array; /** * A statement */ statement?: string; /** * A set of values for a statement */ values?: Array; /** * Set to true for database encryption */ encrypted?: boolean; /*** * Set the mode for database encryption * ["encryption", "secret","newsecret"] */ mode?: string; /*** * Set the JSON object to import * */ jsonstring?: string; /*** * Set the mode to export JSON Object * "full", "partial" * */ jsonexportmode?: string; /*** * Set the synchronization date * */ syncdate?: string; } export interface capSQLiteResult { /** * result set to true when successful else false */ result?: boolean; /** * the number of changes from an execute or run command */ changes?: any; /** * the data values list as an Array */ values?: Array; /** * a message */ message?: string; /** * an export JSON object */ export?: any; } export interface capSQLiteSet { /** * A statement */ statement?: String; /** * the data values list as an Array */ values?: Array; }