@mcma/data
Advanced tools
Comparing version 0.12.1 to 0.13.0
import { Query } from "./query/query"; | ||
import { CustomQuery, CustomQueryParameters } from "./query/custom-query"; | ||
import { Document } from "./document"; | ||
import { DocumentDatabaseMutex } from "./document-database-mutex"; | ||
import { QueryResults } from "./query/query-results"; | ||
export interface DocumentDatabaseTable { | ||
query<TDocument extends Document = Document>(query: Query<TDocument>): Promise<TDocument[]>; | ||
query<TDocument extends Document = Document>(query: Query<TDocument>): Promise<QueryResults<TDocument>>; | ||
customQuery<TDocument extends Document = Document, TParameters extends CustomQueryParameters = CustomQueryParameters>(query: CustomQuery<TDocument, TParameters>): Promise<QueryResults<TDocument>>; | ||
get<TDocument extends Document = Document>(id: string): Promise<TDocument>; | ||
put<TDocument extends Document = Document>(id: string, resource: TDocument): Promise<TDocument>; | ||
delete(id: string): Promise<void>; | ||
createMutex(mutexName: string, mutexHolder: string, lockTimeout?: number): DocumentDatabaseMutex; | ||
} |
export * from "./document"; | ||
export * from "./query/operator"; | ||
export * from "./query/filter"; | ||
export * from "./query/query"; | ||
export * from "./query/helpers"; | ||
export * from "./document-database-mutex"; | ||
export * from "./document-database-table"; | ||
export * from "./document-database-table-provider"; | ||
export * from "./document-type"; | ||
export * from "./query/custom-query"; | ||
export * from "./query/filter"; | ||
export * from "./query/helpers"; | ||
export * from "./query/operator"; | ||
export * from "./query/query"; | ||
export * from "./query/query-results"; |
@@ -6,3 +6,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./document-database-mutex")); | ||
__export(require("./query/custom-query")); | ||
__export(require("./query/filter")); | ||
__export(require("./query/helpers")); |
@@ -14,2 +14,3 @@ import { BinaryOperator, LogicalOperator } from "./operator"; | ||
} | ||
export declare function hasFilterCriteria<T extends Document = Document>(filterExpression: FilterExpression<T>): boolean; | ||
export declare function isFilterCriteriaGroup<T extends Document = Document>(obj: any): obj is FilterCriteriaGroup<T>; |
@@ -11,2 +11,6 @@ "use strict"; | ||
exports.FilterCriteria = FilterCriteria; | ||
function hasFilterCriteria(filterExpression) { | ||
return !!filterExpression && (!isFilterCriteriaGroup(filterExpression) || (!!filterExpression.children && filterExpression.children.length > 0)); | ||
} | ||
exports.hasFilterCriteria = hasFilterCriteria; | ||
function isFilterCriteriaGroup(obj) { | ||
@@ -13,0 +17,0 @@ return obj && obj.logicalOperator; |
import { FilterExpression } from "./filter"; | ||
import { Document } from "../document"; | ||
export interface Query<TDocument extends Document = Document> { | ||
pageNumber?: number; | ||
pageSize?: number; | ||
path: string; | ||
filterExpression?: FilterExpression<TDocument>; | ||
pageSize?: number; | ||
pageStartToken?: string; | ||
sortBy?: string; | ||
sortAscending?: boolean; | ||
} |
{ | ||
"name": "@mcma/data", | ||
"version": "0.12.1", | ||
"version": "0.13.0", | ||
"description": "Node module with helper utils for dealing with data in the EBU MCMA framework", | ||
@@ -32,6 +32,6 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/core": "0.12.1" | ||
"@mcma/core": "0.13.0" | ||
}, | ||
"devDependencies": { | ||
"@mcma/core": "0.12.1", | ||
"@mcma/core": "0.13.0", | ||
"@types/node": "^13.7.4", | ||
@@ -38,0 +38,0 @@ "jasmine": "^3.3.1" |
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
11058
29
225