@synatic/noql
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -199,2 +199,34 @@ import type {Document, Sort} from 'mongodb'; | ||
requiresAs?: boolean; | ||
/** Specifies if this query requires a group by */ | ||
forceGroup?: boolean; | ||
jsonSchemaReturnType: JSONSchemaTypeName | SchemaFn; | ||
//TODO Rk, would be good to have a description here and auto generate docs | ||
} | ||
export type JSONSchemaTypeName = | ||
| 'string' | ||
| 'number' | ||
| 'integer' | ||
| 'boolean' | ||
| 'object' | ||
| 'date' | ||
| 'string[]' | ||
| 'number[]' | ||
| 'integer[]' | ||
| 'boolean[]' | ||
| 'object[]' | ||
| 'date[]' | ||
| 'null'; | ||
type SchemaFn = (params: any) => { | ||
/** Specifies if there is a json schema type returned or the name of the field that defines the type */ | ||
type: 'fieldName' | 'jsonSchemaValue'; | ||
jsonSchemaValue?: JSONSchemaTypeName; | ||
fieldName?: 'string'; | ||
/** Specifies if the result will be an array of the field type, should not apply to jsonSchemaValue */ | ||
isArray?: boolean; | ||
}; | ||
export type JsonSchemaTypeMap = { | ||
[key: string]: JSONSchemaTypeName; | ||
}; |
{ | ||
"name": "@synatic/noql", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Convert SQL statements to mongo queries or aggregates", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,3 +7,3 @@ # NoQL - Not Only SQL | ||
For full docs and a playground to try NoQL out, vist [https://noql.synatic.dev/](https://noql.synatic.dev/) | ||
For full docs and a playground to try NoQL out, visit [https://noql.synatic.dev/](https://noql.synatic.dev/) | ||
@@ -10,0 +10,0 @@ ## Installation |
Sorry, the diff of this file is too big to display
232833
5446