@tauri-apps/plugin-sql 2.0.0 → 2.0.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 CHANGED
@@ -12,7 +12,7 @@ Interface with SQL databases through [sqlx](https://github.com/launchbadge/sqlx)
12
12
 
13
13
  ## Install
14
14
 
15
- _This plugin requires a Rust version of at least **1.78**_
15
+ _This plugin requires a Rust version of at least **1.77.2**_
16
16
 
17
17
  There are three general methods of installation that we can recommend.
18
18
 
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-sql#v2
56
56
 
57
57
  First you need to register the core plugin with Tauri:
58
58
 
59
- `src-tauri/src/main.rs`
59
+ `src-tauri/src/lib.rs`
60
60
 
61
61
  ```rust
62
62
  fn main() {
package/dist-js/index.cjs CHANGED
@@ -107,12 +107,12 @@ class Database {
107
107
  * ```ts
108
108
  * // for sqlite & postgres
109
109
  * const result = await db.select(
110
- * "SELECT * from todos WHERE id = $1", id
110
+ * "SELECT * from todos WHERE id = $1", [ id ]
111
111
  * );
112
112
  *
113
113
  * // for mysql
114
114
  * const result = await db.select(
115
- * "SELECT * from todos WHERE id = ?", id
115
+ * "SELECT * from todos WHERE id = ?", [ id ]
116
116
  * );
117
117
  * ```
118
118
  */
@@ -4,12 +4,12 @@ export interface QueryResult {
4
4
  /**
5
5
  * The last inserted `id`.
6
6
  *
7
- * This value is always `0` when using the Postgres driver. If the
7
+ * This value is not set for Postgres databases. If the
8
8
  * last inserted id is required on Postgres, the `select` function
9
9
  * must be used, with a `RETURNING` clause
10
10
  * (`INSERT INTO todos (title) VALUES ($1) RETURNING id`).
11
11
  */
12
- lastInsertId: number;
12
+ lastInsertId?: number;
13
13
  }
14
14
  /**
15
15
  * **Database**
@@ -95,12 +95,12 @@ export default class Database {
95
95
  * ```ts
96
96
  * // for sqlite & postgres
97
97
  * const result = await db.select(
98
- * "SELECT * from todos WHERE id = $1", id
98
+ * "SELECT * from todos WHERE id = $1", [ id ]
99
99
  * );
100
100
  *
101
101
  * // for mysql
102
102
  * const result = await db.select(
103
- * "SELECT * from todos WHERE id = ?", id
103
+ * "SELECT * from todos WHERE id = ?", [ id ]
104
104
  * );
105
105
  * ```
106
106
  */
package/dist-js/index.js CHANGED
@@ -105,12 +105,12 @@ class Database {
105
105
  * ```ts
106
106
  * // for sqlite & postgres
107
107
  * const result = await db.select(
108
- * "SELECT * from todos WHERE id = $1", id
108
+ * "SELECT * from todos WHERE id = $1", [ id ]
109
109
  * );
110
110
  *
111
111
  * // for mysql
112
112
  * const result = await db.select(
113
- * "SELECT * from todos WHERE id = ?", id
113
+ * "SELECT * from todos WHERE id = ?", [ id ]
114
114
  * );
115
115
  * ```
116
116
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/plugin-sql",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Interface with SQL databases",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "authors": [