@insertish/zangodb
Advanced tools
Comparing version 1.0.11 to 1.0.12
{ | ||
"name": "@insertish/zangodb", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "Fork of ZangoDB - MongoDB-like interface for HTML5 IndexedDB", | ||
@@ -5,0 +5,0 @@ "main": "./build/src/index.js", |
/// <reference types="node" /> | ||
export interface Callback { (error: Error): void; } | ||
export interface ResultCallback<T> { (error: Error, result: T): void; } | ||
export interface IteratorCallback { (doc: any): void; } | ||
declare module "@insertish/zangodb" { | ||
export interface Callback { (error: Error): void; } | ||
export interface ResultCallback<T> { (error: Error, result: T): void; } | ||
export interface IteratorCallback { (doc: any): void; } | ||
export class Cursor { | ||
filter(expr: Object): Cursor; | ||
forEach(fn: IteratorCallback, cb?: Callback): Promise<Object>; | ||
group(spec: Object): Cursor; | ||
hint(path: string): Cursor; | ||
limit(num: number): Cursor; | ||
project(spec: Object): Cursor; | ||
skip(num: number): Cursor; | ||
sort(spec: Object): Cursor; | ||
toArray(cb?: ResultCallback<Object[]>): Promise<Object[]>; | ||
unwind(path: string): Cursor; | ||
} | ||
export class Cursor { | ||
filter(expr: Object): Cursor; | ||
forEach(fn: IteratorCallback, cb?: Callback): Promise<Object>; | ||
group(spec: Object): Cursor; | ||
hint(path: string): Cursor; | ||
limit(num: number): Cursor; | ||
project(spec: Object): Cursor; | ||
skip(num: number): Cursor; | ||
sort(spec: Object): Cursor; | ||
toArray(cb?: ResultCallback<Object[]>): Promise<Object[]>; | ||
unwind(path: string): Cursor; | ||
} | ||
export class Collection { | ||
name: string; | ||
export class Collection { | ||
name: string; | ||
aggregate(pipeline: Object[]): Cursor; | ||
find(expr: Object, projection_spec?: Object): Cursor; | ||
findOne(expr: Object, projection_spec?: Object, | ||
cb?: ResultCallback<Object>): Promise<Object>; | ||
insert(docs: Object|Object[], cb?: Callback): Promise<void>; | ||
remove(expr: Object, cb?: Callback): Promise<void>; | ||
update(expr: Object, spec: Object, cb?: Callback): Promise<void>; | ||
} | ||
aggregate(pipeline: Object[]): Cursor; | ||
find(expr: Object, projection_spec?: Object): Cursor; | ||
findOne(expr: Object, projection_spec?: Object, | ||
cb?: ResultCallback<Object>): Promise<Object>; | ||
insert(docs: Object|Object[], cb?: Callback): Promise<void>; | ||
remove(expr: Object, cb?: Callback): Promise<void>; | ||
update(expr: Object, spec: Object, cb?: Callback): Promise<void>; | ||
} | ||
export class Db { | ||
constructor(name: string, version?: number, config?: string[]|Object); | ||
export class Db { | ||
constructor(name: string, version?: number, config?: string[]|Object); | ||
name: string; | ||
version: number; | ||
name: string; | ||
version: number; | ||
open(cb?: Callback): ResultCallback<Db>; | ||
close(): void; | ||
collection(name: string): Collection; | ||
drop(cb?: Callback): Promise<void>; | ||
open(cb?: Callback): ResultCallback<Db>; | ||
close(): void; | ||
collection(name: string): Collection; | ||
drop(cb?: Callback): Promise<void>; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2973482
43322