@ark7/model
Advanced tools
Comparing version 2.0.42 to 2.0.43
/** | ||
* Indicate a field has an index. | ||
* Create an index on current field. | ||
* | ||
* @param options.index Enable current field index. | ||
* @param options.unique Indicate it's a unique index. | ||
* @param options.sparse Indicate it could be nullable. | ||
* @param options.indexDisabled Disable all current and nested field indexes. | ||
*/ | ||
@@ -7,2 +12,5 @@ export declare function Index(options?: Partial<IndexOptions>): PropertyDecorator; | ||
* Indicate a field is unique. | ||
* | ||
* @param options.unique Indicate it's a unique index. | ||
* @param options.sparse Indicate it could be nullable. | ||
*/ | ||
@@ -9,0 +17,0 @@ export declare function Unique(options?: { |
@@ -9,3 +9,8 @@ "use strict"; | ||
/** | ||
* Indicate a field has an index. | ||
* Create an index on current field. | ||
* | ||
* @param options.index Enable current field index. | ||
* @param options.unique Indicate it's a unique index. | ||
* @param options.sparse Indicate it could be nullable. | ||
* @param options.indexDisabled Disable all current and nested field indexes. | ||
*/ | ||
@@ -15,3 +20,3 @@ function Index(options = {}) { | ||
index: true, | ||
}, options)); | ||
}, options, options.indexDisabled && !options.index ? { index: false } : {})); | ||
} | ||
@@ -21,2 +26,5 @@ exports.Index = Index; | ||
* Indicate a field is unique. | ||
* | ||
* @param options.unique Indicate it's a unique index. | ||
* @param options.sparse Indicate it could be nullable. | ||
*/ | ||
@@ -23,0 +31,0 @@ function Unique(options = {}) { |
{ | ||
"name": "@ark7/model", | ||
"version": "2.0.42", | ||
"version": "2.0.43", | ||
"description": "Ark7 model used for both backend and frontend", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
Sorry, the diff of this file is not supported yet
206867
3077