@mrnafisia/type-query
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -247,3 +247,5 @@ "use strict"; | ||
if (operator === keywords_1.OperatorCode.Raw) { | ||
const rawExpression = expression[1](paramsStart); | ||
const rawExpression = typeof expression[1] === 'function' | ||
? expression[1](paramsStart) | ||
: { expression: expression[1], params: [] }; | ||
return (0, never_catch_1.ok)(partialQuery(rawExpression.expression, rawExpression.params)); | ||
@@ -250,0 +252,0 @@ } |
@@ -24,6 +24,6 @@ import Decimal from 'decimal.js'; | ||
declare const column: <S extends Schema, C extends keyof S & string>(table: Table<S>, column: C, full?: boolean, alias?: string) => NullableType<S[C]['type'], S[C]['nullable']>; | ||
declare const raw: <T>(get: (paramsStart: number) => { | ||
declare const raw: <T>(textOrGet: string | ((paramsStart: number) => { | ||
expression: string; | ||
params: string[]; | ||
}) => T; | ||
})) => T; | ||
declare const ignore: <T>(expression: T, otherwise: Exclude<T, undefined>) => Exclude<T, undefined>; | ||
@@ -30,0 +30,0 @@ declare const not: <T extends boolean | null | undefined>(expression: T) => T; |
@@ -35,3 +35,3 @@ "use strict"; | ||
exports.column = column; | ||
const raw = (get) => [keywords_1.OperatorCode.Raw, get]; | ||
const raw = (textOrGet) => [keywords_1.OperatorCode.Raw, textOrGet]; | ||
exports.raw = raw; | ||
@@ -38,0 +38,0 @@ const ignore = (expression, otherwise) => [keywords_1.OperatorCode.Ignore, expression, otherwise]; |
{ | ||
"name": "@mrnafisia/type-query", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "mini-orm with full type support for postgres.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
281827
2497