@powersync/common 0.0.0-dev-20240508113424 → 0.0.0-dev-20240508121819

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.
@@ -239,6 +239,7 @@ export class AbstractPowerSyncDatabase extends BaseObserver {
239
239
  await tx.execute(`DELETE FROM ${PSInternalTable.OPLOG}`);
240
240
  await tx.execute(`DELETE FROM ${PSInternalTable.CRUD}`);
241
241
  await tx.execute(`DELETE FROM ${PSInternalTable.BUCKETS}`);
242
+ await tx.execute(`DELETE FROM ${PSInternalTable.UNTYPED}`);
242
243
  const tableGlob = clearLocal ? 'ps_data_*' : 'ps_data__*';
243
244
  const existingTableRows = await tx.execute(`
244
245
  SELECT name FROM sqlite_master WHERE type='table' AND name GLOB ?
@@ -38,7 +38,8 @@ export declare enum PSInternalTable {
38
38
  DATA = "ps_data",
39
39
  CRUD = "ps_crud",
40
40
  BUCKETS = "ps_buckets",
41
- OPLOG = "ps_oplog"
41
+ OPLOG = "ps_oplog",
42
+ UNTYPED = "ps_untyped"
42
43
  }
43
44
  export interface BucketStorageListener extends BaseListener {
44
45
  crudUpdate: () => void;
@@ -4,4 +4,5 @@ export var PSInternalTable;
4
4
  PSInternalTable["CRUD"] = "ps_crud";
5
5
  PSInternalTable["BUCKETS"] = "ps_buckets";
6
6
  PSInternalTable["OPLOG"] = "ps_oplog";
7
+ PSInternalTable["UNTYPED"] = "ps_untyped";
7
8
  })(PSInternalTable || (PSInternalTable = {}));
@@ -8,9 +8,9 @@ type SchemaTableType<S extends SchemaType> = {
8
8
  * A schema is a collection of tables. It is used to define the structure of a database.
9
9
  */
10
10
  export declare class Schema<S extends SchemaType = SchemaType> {
11
- tables: ClassicTable[] | S;
12
11
  readonly types: SchemaTableType<S>;
13
12
  readonly props: S;
13
+ readonly tables: ClassicTable[];
14
14
  constructor(tables: ClassicTable[] | S);
15
15
  validate(): void;
16
16
  toJSON(): {
@@ -3,14 +3,13 @@ import { Table as ClassicTable } from './Table';
3
3
  * A schema is a collection of tables. It is used to define the structure of a database.
4
4
  */
5
5
  export class Schema {
6
- tables;
7
6
  /*
8
7
  Only available when constructing with mapped typed definition columns
9
8
  */
10
9
  types;
11
10
  props;
11
+ tables;
12
12
  constructor(tables) {
13
- this.tables = tables;
14
13
  if (Array.isArray(tables)) {
15
14
  this.tables = tables;
16
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/common",
3
- "version": "0.0.0-dev-20240508113424",
3
+ "version": "0.0.0-dev-20240508121819",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"