@powersync/op-sqlite 0.4.0 → 0.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/op-sqlite",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "PowerSync - sync Postgres or MongoDB with SQLite in your React Native app for offline-first and real-time data",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/commonjs/index.js",
@@ -59,13 +59,13 @@
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@op-engineering/op-sqlite": "^11.2.13",
62
- "@powersync/common": "^1.24.0",
62
+ "@powersync/common": "^1.26.0",
63
63
  "react": "*",
64
64
  "react-native": "*"
65
65
  },
66
66
  "dependencies": {
67
67
  "async-lock": "^1.4.0",
68
- "@powersync/common": "1.24.0"
68
+ "@powersync/common": "1.26.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@op-engineering/op-sqlite": "^11.2.13",
@@ -80,8 +80,7 @@
80
80
  "react": "18.3.1",
81
81
  "react-native": "0.75.3",
82
82
  "react-native-builder-bob": "^0.30.2",
83
- "turbo": "^1.10.7",
84
- "typescript": "^5.2.2"
83
+ "turbo": "^1.10.7"
85
84
  },
86
85
  "eslintIgnore": [
87
86
  "node_modules/",
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
 
18
18
  s.dependency "React-callinvoker"
19
19
  s.dependency "React"
20
- s.dependency "powersync-sqlite-core", "~> 0.3.8"
20
+ s.dependency "powersync-sqlite-core", "~> 0.3.12"
21
21
  if defined?(install_modules_dependencies())
22
22
  install_modules_dependencies(s)
23
23
  else
@@ -97,6 +97,10 @@ export class OPSQLiteConnection extends BaseObserver<DBAdapterListener> {
97
97
  };
98
98
  }
99
99
 
100
+ async executeRaw(query: string, params?: any[]): Promise<any[][]> {
101
+ return await this.DB.executeRaw(query, params);
102
+ }
103
+
100
104
  async executeBatch(query: string, params: any[][] = []): Promise<QueryResult> {
101
105
  const tuple: SQLBatchTuple[] = [[query, params[0]]];
102
106
  params.slice(1).forEach((p) => tuple.push([query, p]));
@@ -245,6 +245,10 @@ export class OPSQLiteDBAdapter extends BaseObserver<DBAdapterListener> implement
245
245
  return this.writeLock((ctx) => ctx.execute(query, params));
246
246
  }
247
247
 
248
+ executeRaw(query: string, params?: any[]) {
249
+ return this.writeLock((ctx) => ctx.executeRaw(query, params));
250
+ }
251
+
248
252
  async executeBatch(query: string, params: any[][] = []): Promise<QueryResult> {
249
253
  return this.writeLock((ctx) => ctx.executeBatch(query, params));
250
254
  }
@@ -272,6 +276,7 @@ export class OPSQLiteDBAdapter extends BaseObserver<DBAdapterListener> implement
272
276
  await connection.execute('BEGIN');
273
277
  const result = await fn({
274
278
  execute: (query, params) => connection.execute(query, params),
279
+ executeRaw: (query, params) => connection.executeRaw(query, params),
275
280
  get: (query, params) => connection.get(query, params),
276
281
  getAll: (query, params) => connection.getAll(query, params),
277
282
  getOptional: (query, params) => connection.getOptional(query, params),