@tauri-apps/plugin-sql 2.0.0-alpha.4 → 2.0.0-alpha.5

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/dist-js/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var primitives = require('@tauri-apps/api/primitives');
3
+ var core = require('@tauri-apps/api/core');
4
4
 
5
5
  // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
6
6
  // SPDX-License-Identifier: Apache-2.0
@@ -31,7 +31,7 @@ class Database {
31
31
  * ```
32
32
  */
33
33
  static async load(path) {
34
- const _path = await primitives.invoke("plugin:sql|load", {
34
+ const _path = await core.invoke("plugin:sql|load", {
35
35
  db: path,
36
36
  });
37
37
  return new Database(_path);
@@ -88,7 +88,7 @@ class Database {
88
88
  * ```
89
89
  */
90
90
  async execute(query, bindValues) {
91
- const [rowsAffected, lastInsertId] = await primitives.invoke("plugin:sql|execute", {
91
+ const [rowsAffected, lastInsertId] = await core.invoke("plugin:sql|execute", {
92
92
  db: this.path,
93
93
  query,
94
94
  values: bindValues ?? [],
@@ -117,7 +117,7 @@ class Database {
117
117
  * ```
118
118
  */
119
119
  async select(query, bindValues) {
120
- const result = await primitives.invoke("plugin:sql|select", {
120
+ const result = await core.invoke("plugin:sql|select", {
121
121
  db: this.path,
122
122
  query,
123
123
  values: bindValues ?? [],
@@ -136,7 +136,7 @@ class Database {
136
136
  * @param db - Optionally state the name of a database if you are managing more than one. Otherwise, all database pools will be in scope.
137
137
  */
138
138
  async close(db) {
139
- const success = await primitives.invoke("plugin:sql|close", {
139
+ const success = await core.invoke("plugin:sql|close", {
140
140
  db,
141
141
  });
142
142
  return success;
package/dist-js/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { invoke } from '@tauri-apps/api/primitives';
1
+ import { invoke } from '@tauri-apps/api/core';
2
2
 
3
3
  // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
4
4
  // SPDX-License-Identifier: Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/plugin-sql",
3
- "version": "2.0.0-alpha.4",
3
+ "version": "2.0.0-alpha.5",
4
4
  "description": "Interface with SQL databases",
5
5
  "license": "MIT or APACHE-2.0",
6
6
  "authors": [
@@ -21,7 +21,7 @@
21
21
  "LICENSE"
22
22
  ],
23
23
  "dependencies": {
24
- "@tauri-apps/api": "2.0.0-alpha.12"
24
+ "@tauri-apps/api": "2.0.0-alpha.13"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "rollup -c"