serialized-query
Advanced tools
Comparing version
@@ -79,3 +79,3 @@ import { IDictionary } from "common-types"; | ||
/** allows a shorthand notation for simple serialized queries */ | ||
where<V>(operation: IComparisonOperator, value: V): this; | ||
where<V>(operation: IComparisonOperator, value: V, key?: string): this; | ||
readonly identity: ISerializedQueryIdentity<T>; | ||
@@ -82,0 +82,0 @@ toJSON(): ISerializedQueryIdentity<T>; |
@@ -155,10 +155,10 @@ "use strict"; | ||
/** allows a shorthand notation for simple serialized queries */ | ||
where(operation, value) { | ||
where(operation, value, key) { | ||
switch (operation) { | ||
case "=": | ||
return this.equalTo(value); | ||
return this.equalTo(value, key); | ||
case ">": | ||
return this.startAt(value); | ||
return this.startAt(value, key); | ||
case "<": | ||
return this.endAt(value); | ||
return this.endAt(value, key); | ||
default: | ||
@@ -165,0 +165,0 @@ const e = new Error(`Unknown comparison operator: ${operation}`); |
@@ -79,3 +79,3 @@ import { IDictionary } from "common-types"; | ||
/** allows a shorthand notation for simple serialized queries */ | ||
where<V>(operation: IComparisonOperator, value: V): this; | ||
where<V>(operation: IComparisonOperator, value: V, key?: string): this; | ||
readonly identity: ISerializedQueryIdentity<T>; | ||
@@ -82,0 +82,0 @@ toJSON(): ISerializedQueryIdentity<T>; |
@@ -163,10 +163,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
/** allows a shorthand notation for simple serialized queries */ | ||
where(operation, value) { | ||
where(operation, value, key) { | ||
switch (operation) { | ||
case "=": | ||
return this.equalTo(value); | ||
return this.equalTo(value, key); | ||
case ">": | ||
return this.startAt(value); | ||
return this.startAt(value, key); | ||
case "<": | ||
return this.endAt(value); | ||
return this.endAt(value, key); | ||
default: | ||
@@ -173,0 +173,0 @@ const e = new Error(`Unknown comparison operator: ${operation}`); |
{ | ||
"name": "serialized-query", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"description": "A simple Typescript class to serialize Firebase queries", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
34482
0.43%