hydrate-mongodb
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -7,2 +7,3 @@ export { NamingStrategies, NamingStrategy } from "./config/namingStrategies"; | ||
export { AnnotationMappingProvider } from "./mapping/providers/annotationMappingProvider"; | ||
export { CollationOptions } from "./mapping/collationOptions"; | ||
export * from "./mapping/providers/decorators"; | ||
@@ -9,0 +10,0 @@ export { Callback, ResultCallback, IteratorCallback } from "./core/callback"; |
@@ -14,2 +14,3 @@ export interface IndexOptions { | ||
name?: string; | ||
collation?: CollationOptions; | ||
} |
{ | ||
"name": "hydrate-mongodb", | ||
"description": "An Object Document Mapper (ODM) for MongoDB.", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"author": { | ||
@@ -28,3 +28,2 @@ "name": "Artifact Health, Inc", | ||
"devDependencies": { | ||
"@types/node": "9.6.6", | ||
"@types/chai": "4.0.1", | ||
@@ -34,3 +33,4 @@ "@types/change-case": "2.3.1", | ||
"@types/mocha": "2.2.35", | ||
"@types/mongodb": "3.0.7", | ||
"@types/mongodb": "3.1.9", | ||
"@types/node": "9.6.6", | ||
"@types/rx": "4.1.1", | ||
@@ -37,0 +37,0 @@ "baseline": "0.3.0", |
@@ -455,2 +455,5 @@ "use strict"; | ||
} | ||
if (query.collationOptions !== undefined) { | ||
cursor.collation(query.collationOptions); | ||
} | ||
if (query.batchSizeValue !== undefined) { | ||
@@ -457,0 +460,0 @@ cursor.batchSize(query.batchSizeValue); |
@@ -16,2 +16,3 @@ /// <reference types="rx-core" /> | ||
import { Observable } from "rx"; | ||
import { CollationOptions } from "../mapping/collationOptions"; | ||
export interface QueryBuilder<T> { | ||
@@ -81,2 +82,3 @@ findAll(callback?: ResultCallback<T[]>): FindQuery<T>; | ||
limit(value: number, callback?: ResultCallback<T[]>): FindQuery<T>; | ||
collation(value: CollationOptions, callback?: ResultCallback<T[]>): FindQuery<T>; | ||
skip(value: number, callback?: ResultCallback<T[]>): FindQuery<T>; | ||
@@ -83,0 +85,0 @@ lazy(callback?: ResultCallback<T[]>): FindQuery<T>; |
@@ -187,2 +187,6 @@ "use strict"; | ||
}; | ||
QueryObject.prototype.collation = function (value, callback) { | ||
this.collationOptions = value; | ||
return this.handleCallback(callback); | ||
}; | ||
QueryObject.prototype.skip = function (value, callback) { | ||
@@ -189,0 +193,0 @@ this.skipCount = value; |
@@ -6,2 +6,3 @@ import {ResultCallback} from "../core/callback"; | ||
import {OrderDocument} from "./orderDocument"; | ||
import {CollationOptions} from "../mapping/collationOptions"; | ||
@@ -27,2 +28,3 @@ /** | ||
limitCount: number; | ||
collationOptions?: CollationOptions; | ||
skipCount: number; | ||
@@ -29,0 +31,0 @@ iterator: IteratorCallback<Object>; |
343036
120
7610