@capawesome/capacitor-libsql 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/android/build.gradle +1 -1
- package/dist/docs.json +5 -5
- package/dist/esm/definitions.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -191,7 +191,7 @@ execute(options: ExecuteOptions) => Promise<void>
|
|
|
191
191
|
|
|
192
192
|
Execute a single SQL statement on the specified database connection.
|
|
193
193
|
|
|
194
|
-
This method can be used to execute any SQL statement, including
|
|
194
|
+
This method can be used to execute any SQL statement, including
|
|
195
195
|
`INSERT`, `UPDATE`, `DELETE`, and `CREATE TABLE`.
|
|
196
196
|
|
|
197
197
|
| Param | Type |
|
|
@@ -230,7 +230,7 @@ query(options: QueryOptions) => Promise<QueryResult>
|
|
|
230
230
|
|
|
231
231
|
Query the database and return the result set.
|
|
232
232
|
|
|
233
|
-
This method can be used to execute `SELECT` statements
|
|
233
|
+
This method can be used to execute `SELECT` statements
|
|
234
234
|
and retrieve the result set.
|
|
235
235
|
|
|
236
236
|
| Param | Type |
|
package/android/build.gradle
CHANGED
|
@@ -36,7 +36,7 @@ android {
|
|
|
36
36
|
buildTypes {
|
|
37
37
|
release {
|
|
38
38
|
minifyEnabled false
|
|
39
|
-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
39
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
lintOptions {
|
package/dist/docs.json
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"text": "0.0.0"
|
|
94
94
|
}
|
|
95
95
|
],
|
|
96
|
-
"docs": "Execute a single SQL statement on the specified database connection.\n\nThis method can be used to execute any SQL statement, including
|
|
96
|
+
"docs": "Execute a single SQL statement on the specified database connection.\n\nThis method can be used to execute any SQL statement, including\n`INSERT`, `UPDATE`, `DELETE`, and `CREATE TABLE`.",
|
|
97
97
|
"complexTypes": [
|
|
98
98
|
"ExecuteOptions"
|
|
99
99
|
],
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"text": "0.0.0"
|
|
140
140
|
}
|
|
141
141
|
],
|
|
142
|
-
"docs": "Query the database and return the result set.\n\nThis method can be used to execute `SELECT` statements
|
|
142
|
+
"docs": "Query the database and return the result set.\n\nThis method can be used to execute `SELECT` statements\nand retrieve the result set.",
|
|
143
143
|
"complexTypes": [
|
|
144
144
|
"QueryResult",
|
|
145
145
|
"QueryOptions"
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
"name": "since"
|
|
328
328
|
}
|
|
329
329
|
],
|
|
330
|
-
"docs": "The authentication token for the database.\n\nThis is required for connecting to a remote database.\nIf the database is local (i.e., a file on the device)
|
|
330
|
+
"docs": "The authentication token for the database.\n\nThis is required for connecting to a remote database.\nIf the database is local (i.e., a file on the device),\nthis can be omitted.",
|
|
331
331
|
"complexTypes": [],
|
|
332
332
|
"type": "string | undefined"
|
|
333
333
|
},
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
"name": "example"
|
|
344
344
|
}
|
|
345
345
|
],
|
|
346
|
-
"docs": "The path to the database file.\n\nIf no path or URL is provided, the plugin will create
|
|
346
|
+
"docs": "The path to the database file.\n\nIf no path or URL is provided, the plugin will create\na new in-memory database.\n\nIf no file exists at the specified path,\na new file will be created.",
|
|
347
347
|
"complexTypes": [],
|
|
348
348
|
"type": "string | undefined"
|
|
349
349
|
},
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
"name": "since"
|
|
356
356
|
}
|
|
357
357
|
],
|
|
358
|
-
"docs": "The URL of the database.\n\nThis can be used to connect to a remote database.\nIf the URL is provided, the `authToken` must also be provided.\n\nIf no path or URL is provided, the plugin will create
|
|
358
|
+
"docs": "The URL of the database.\n\nThis can be used to connect to a remote database.\nIf the URL is provided, the `authToken` must also be provided.\n\nIf no path or URL is provided, the plugin will create\na new in-memory database.",
|
|
359
359
|
"complexTypes": [],
|
|
360
360
|
"type": "string | undefined"
|
|
361
361
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface LibsqlPlugin {\n /**\n * Begin a transaction on the specified database connection.\n *\n * Only available on Android.\n *\n * @since 0.0.0\n */\n beginTransaction(\n options: BeginTransactionOptions,\n ): Promise<BeginTransactionResult>;\n /**\n * Commit the current transaction on the specified database connection.\n *\n * Only available on Android.\n *\n * @since 0.0.0\n */\n commitTransaction(options: CommitTransactionOptions): Promise<void>;\n /**\n * Connect to a database.\n *\n * This method must be called before any other methods that interact with the database.\n *\n * @since 0.0.0\n */\n connect(options: ConnectOptions): Promise<ConnectResult>;\n /**\n * Execute a single SQL statement on the specified database connection.\n *\n * This method can be used to execute any SQL statement, including
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface LibsqlPlugin {\n /**\n * Begin a transaction on the specified database connection.\n *\n * Only available on Android.\n *\n * @since 0.0.0\n */\n beginTransaction(\n options: BeginTransactionOptions,\n ): Promise<BeginTransactionResult>;\n /**\n * Commit the current transaction on the specified database connection.\n *\n * Only available on Android.\n *\n * @since 0.0.0\n */\n commitTransaction(options: CommitTransactionOptions): Promise<void>;\n /**\n * Connect to a database.\n *\n * This method must be called before any other methods that interact with the database.\n *\n * @since 0.0.0\n */\n connect(options: ConnectOptions): Promise<ConnectResult>;\n /**\n * Execute a single SQL statement on the specified database connection.\n *\n * This method can be used to execute any SQL statement, including\n * `INSERT`, `UPDATE`, `DELETE`, and `CREATE TABLE`.\n *\n * @since 0.0.0\n */\n execute(options: ExecuteOptions): Promise<void>;\n /**\n * Execute a batch of SQL statements on the specified database connection.\n *\n * This method can be used to execute multiple SQL statements in a single call.\n *\n * @since 0.0.0\n */\n executeBatch(options: ExecuteBatchOptions): Promise<void>;\n /**\n * Query the database and return the result set.\n *\n * This method can be used to execute `SELECT` statements\n * and retrieve the result set.\n *\n * @since 0.0.0\n */\n query(options: QueryOptions): Promise<QueryResult>;\n /**\n * Rollback the current transaction on the specified database connection.\n *\n * This method will undo all changes made in the current transaction.\n *\n * Only available on Android.\n *\n * @since 0.0.0\n */\n rollbackTransaction(options: RollbackTransactionOptions): Promise<void>;\n /**\n * Synchronize the database with the remote server.\n *\n * Available on iOS and Android.\n *\n * @since 0.0.0\n */\n sync(options: SyncOptions): Promise<void>;\n}\n\n/**\n * @since 0.0.0\n */\nexport interface BeginTransactionOptions {\n /**\n * The ID of the connection to begin the transaction on.\n *\n * @since 0.0.0\n */\n connectionId: string;\n}\n\n/**\n * @since 0.0.0\n */\nexport interface BeginTransactionResult {\n /**\n * The ID of the transaction that was started.\n *\n * @since 0.0.0\n */\n transactionId: string;\n}\n\n/**\n * @since 0.0.0\n */\nexport interface CommitTransactionOptions {\n /**\n * The ID of the connection to commit the transaction on.\n *\n * @since 0.0.0\n */\n connectionId: string;\n /**\n * The ID of the transaction to commit.\n *\n * @since 0.0.0\n */\n transactionId: string;\n}\n\nexport interface ConnectOptions {\n /**\n * The authentication token for the database.\n *\n * This is required for connecting to a remote database.\n * If the database is local (i.e., a file on the device),\n * this can be omitted.\n *\n * @since 0.0.0\n */\n authToken?: string;\n /**\n * The path to the database file.\n *\n * If no path or URL is provided, the plugin will create\n * a new in-memory database.\n *\n * If no file exists at the specified path,\n * a new file will be created.\n *\n * @since 0.0.0\n * @example '/data/user/0/com.example.plugin/cache/data.db'\n */\n path?: string;\n /**\n * The URL of the database.\n *\n * This can be used to connect to a remote database.\n * If the URL is provided, the `authToken` must also be provided.\n *\n * If no path or URL is provided, the plugin will create\n * a new in-memory database.\n *\n * @since 0.0.0\n */\n url?: string;\n}\n\n/**\n * @since 0.0.0\n */\nexport interface ConnectResult {\n /**\n * The ID of the connection.\n *\n * @since 0.0.0\n */\n connectionId: string;\n}\n\n/**\n * @since 0.0.0\n */\nexport interface ExecuteOptions {\n /**\n * The ID of the connection to execute the SQL statement on.\n *\n * @since 0.0.0\n */\n connectionId: string;\n /**\n * The SQL statement to execute.\n *\n * @since 0.0.0\n * @example 'INSERT INTO users (name, age) VALUES (?, ?)'\n */\n statement: string;\n /**\n * The transaction ID to use for the SQL statement.\n *\n * Only available on Android.\n *\n * @since 0.0.0\n */\n transactionId?: string;\n /**\n * The values to bind to the SQL statement.\n *\n * @since 0.0.0\n * @example ['Alice', 30]\n */\n values?: Value[];\n}\n\n/**\n * @since 0.0.0\n */\nexport interface ExecuteBatchOptions {\n /**\n * The ID of the connection to execute the batch on.\n *\n * @since 0.0.0\n */\n connectionId: string;\n /**\n * The SQL statements to execute in the batch.\n *\n * @since 0.0.0\n * @example [\n * 'INSERT INTO users (name, age) VALUES (?, ?)',\n * 'UPDATE users SET age = ? WHERE name = ?'\n * ]\n */\n statement: string[];\n /**\n * The values to bind to the SQL statements.\n *\n * @since 0.0.0\n */\n values?: Value[][];\n}\n\n/**\n * @since 0.0.0\n */\nexport interface QueryOptions {\n /**\n * The ID of the connection to query.\n *\n * @since 0.0.0\n */\n connectionId: string;\n /**\n * The SQL statement to execute.\n *\n * @since 0.0.0\n * @example 'SELECT name, age FROM users WHERE age > ?'\n */\n statement: string;\n /**\n * The transaction ID to use for the query.\n *\n * Only available on Android.\n *\n * @since 0.0.0\n */\n transactionId?: string;\n /**\n * The values to bind to the SQL statement.\n *\n * @since 0.0.0\n * @example ['Alice', 30]\n */\n values?: Value[];\n}\n\n/**\n * @since 0.0.0\n */\nexport interface QueryResult {\n /**\n * The values returned by the query.\n *\n * @since 0.0.0\n * @example [['Alice', 30], ['Bob', 25]]\n */\n rows: Value[][];\n}\n\n/**\n * @since 0.0.0\n */\nexport interface RollbackTransactionOptions {\n /**\n * The ID of the connection to rollback the transaction on.\n *\n * @since 0.0.0\n */\n connectionId: string;\n /**\n * The ID of the transaction to rollback.\n *\n * @since 0.0.0\n */\n transactionId: string;\n}\n\n/**\n * @since 0.0.0\n */\nexport interface SyncOptions {\n /**\n * The ID of the connection to sync.\n *\n * @since 0.0.0\n */\n connectionId: string;\n}\n\n/**\n * @since 0.0.0\n */\nexport type Value = string | number | null;\n"]}
|