@duraxis/core 0.1.0 → 0.2.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.
@@ -0,0 +1,15 @@
1
+ import type { StorageDriver } from "@duraxis/storage";
2
+ import { type CollectionDefinition } from "../catalog/collection-schema.js";
3
+ import type { Snapshot } from "../commit/manifest.js";
4
+ import { StorageKeyManager } from "../security/storage-key-manager.js";
5
+ import type { PendingWrite } from "../transactions/transaction.js";
6
+ export declare class ForeignKeyManager {
7
+ #private;
8
+ constructor(storage: StorageDriver, keys?: StorageKeyManager);
9
+ prepare(snapshot: Snapshot, sourceWrites: ReadonlyMap<string, PendingWrite>, sourceCatalog: ReadonlyMap<string, CollectionDefinition>): Promise<Map<string, PendingWrite>>;
10
+ private validateCatalog;
11
+ private incoming;
12
+ private childIds;
13
+ private finalRecordExists;
14
+ private finalDocument;
15
+ }
@@ -40,6 +40,7 @@ export declare class Transaction {
40
40
  put(key: string, data: Uint8Array): void;
41
41
  delete(key: string): void;
42
42
  defineCollection(definition: CollectionDefinition): void;
43
+ defineCollections(definitions: readonly CollectionDefinition[]): void;
43
44
  addIndex(collection: string, index: SecondaryIndexDefinition): void;
44
45
  removeIndex(collection: string, indexName: string): void;
45
46
  getDocument(collection: string, id: string): Promise<DocumentRecord | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duraxis/core",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Transactional embedded database engine and query primitives for Duraxis.",
5
5
  "license": "ISC",
6
6
  "author": "João Paulo Dias <joaopdias.dev@gmail.com>",
@@ -49,7 +49,7 @@
49
49
  "@duraxis/storage": "0.1.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@duraxis/storage-memory": "0.1.0"
52
+ "@duraxis/storage-memory": "0.1.1"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "vite build && tsc -p tsconfig.build.json",