Adding version log on startup

This commit is contained in:
Fabian Stamm
2019-11-14 14:26:06 +01:00
parent 50268d05c5
commit e287890ca1
4 changed files with 10 additions and 6 deletions

View File

@ -4,6 +4,7 @@ import getLevelDB, { LevelDB, deleteLevelDB } from "../storage";
import DocumentLock from "./lock";
import { DocumentQuery, CollectionQuery, Query } from "./query";
import Logging from "@hibas123/nodelogging";
import Session from "./session";
export class DatabaseManager {
static databases = new Map<string, Database>();
@ -105,13 +106,13 @@ export class Database {
}
getQuery(path: string[], sender: string, type: "document" | "collection" | "any") {
getQuery(path: string[], session: Session, type: "document" | "collection" | "any") {
if (type === "document")
return new DocumentQuery(this, path, sender);
return new DocumentQuery(this, path, session);
else if (type === "collection")
return new CollectionQuery(this, path, sender);
return new CollectionQuery(this, path, session);
else
return new Query(this, path, sender);
return new Query(this, path, session);
}
async stop() {