Improvements in collection storage. Breaks compatibility with previous versions!
This commit is contained in:
@ -54,12 +54,17 @@ export class Database {
|
||||
private level = getLevelDB(this.name);
|
||||
|
||||
get data() {
|
||||
return this.level;
|
||||
return this.level.data;
|
||||
}
|
||||
|
||||
get collections() {
|
||||
return this.level.collection;
|
||||
}
|
||||
|
||||
|
||||
public rules: Rules;
|
||||
public locks = new DocumentLock()
|
||||
public collectionLocks = new DocumentLock()
|
||||
|
||||
public changes = new Map<string, Set<(change: Change) => void>>();
|
||||
|
||||
@ -89,8 +94,8 @@ export class Database {
|
||||
}
|
||||
|
||||
async setRootKey(key: string) {
|
||||
await Settings.setDatabaseAccessKey(this.name, key);
|
||||
this.accesskey = key;
|
||||
await Settings.setDatabaseRootKey(this.name, key);
|
||||
this.rootkey = key;
|
||||
}
|
||||
|
||||
async setPublicKey(key: string) {
|
||||
|
Reference in New Issue
Block a user