update structure

This commit is contained in:
2016-09-12 17:31:23 +02:00
parent 50a6a1a690
commit 411b0b1ae9
7 changed files with 52 additions and 18 deletions

View File

@ -10,15 +10,26 @@ export class DbCollection<T> {
/**
* adds a validation function that all newly inserted and updated objects have to pass
*/
addObjectValidation(){}
addObjectValidation(funcArg){}
/**
* inserts am object into the DbCollection
* finds an object in the DbCollection
*/
insert(objectArg: T) {}
find(docMatchArg: T): T[] {
return this.collection.find().toArray()
}
/**
* inserts object into the DbCollection
*/
insertOne(docArg: T): PromiseLike<void> {
return this.collection.insertOne(docArg)
}
/**
* inserts many objects at once into the DbCollection
*/
insertMany(objectArrayArg: T[]) {}
insertMany(docArrayArg: T[]): void {
}
}