@powersync/op-sqlite 0.1.1 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/op-sqlite",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
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",
@@ -58,7 +58,7 @@
58
58
  "access": "public"
59
59
  },
60
60
  "peerDependencies": {
61
- "@op-engineering/op-sqlite": "^9.2.1",
61
+ "@op-engineering/op-sqlite": "^10.1.0",
62
62
  "@powersync/common": "^1.21.0",
63
63
  "react": "*",
64
64
  "react-native": "*"
@@ -68,7 +68,7 @@
68
68
  "@powersync/common": "1.21.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@op-engineering/op-sqlite": "^9.2.1",
71
+ "@op-engineering/op-sqlite": "^10.1.0",
72
72
  "@react-native/eslint-config": "^0.73.1",
73
73
  "@types/async-lock": "^1.4.0",
74
74
  "@types/react": "^18.2.44",
@@ -64,12 +64,12 @@ export class OPSQLiteConnection extends BaseObserver<DBAdapterListener> {
64
64
 
65
65
  async getAll<T>(sql: string, parameters?: any[]): Promise<T[]> {
66
66
  const result = await this.DB.execute(sql, parameters);
67
- return result.rows ?? [];
67
+ return (result.rows ?? []) as T[];
68
68
  }
69
69
 
70
70
  async getOptional<T>(sql: string, parameters?: any[]): Promise<T | null> {
71
71
  const result = await this.DB.execute(sql, parameters);
72
- return result.rows?.[0] ?? null;
72
+ return (result.rows?.[0] as T) ?? null;
73
73
  }
74
74
 
75
75
  async get<T>(sql: string, parameters?: any[]): Promise<T> {