objection
Advanced tools
Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6
@@ -13,10 +13,6 @@ 'use strict'; | ||
fn.coalesce = (...args) => { | ||
return fn('COALESCE', args); | ||
}; | ||
for (const func of ['coalesce', 'concat', 'sum', 'avg', 'min', 'max', 'count', 'upper', 'lower']) { | ||
fn[func] = (...args) => fn(func.toUpperCase(), args); | ||
} | ||
fn.concat = (...args) => { | ||
return fn('CONCAT', args); | ||
}; | ||
fn.now = precision => { | ||
@@ -23,0 +19,0 @@ precision = parseInt(asSingle(precision), 10); |
{ | ||
"name": "objection", | ||
"version": "2.0.0-alpha.5", | ||
"version": "2.0.0-alpha.6", | ||
"description": "An SQL-friendly ORM for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/objection.js", |
@@ -64,2 +64,5 @@ /// <reference types="node" /> | ||
export interface FunctionBuilder extends Castable {} | ||
export interface SqlFunctionShortcut { | ||
(...args: any[]): FunctionBuilder; | ||
} | ||
export interface FunctionFunction { | ||
@@ -69,4 +72,11 @@ (functionName: string, ...arguments: any[]): FunctionBuilder; | ||
now(precision: number): FunctionBuilder; | ||
coalesce(...arguments: any[]): FunctionBuilder; | ||
concat(...arguments: any[]): FunctionBuilder; | ||
coalesce: SqlFunctionShortcut; | ||
concat: SqlFunctionShortcut; | ||
sum: SqlFunctionShortcut; | ||
avg: SqlFunctionShortcut; | ||
min: SqlFunctionShortcut; | ||
max: SqlFunctionShortcut; | ||
count: SqlFunctionShortcut; | ||
upper: SqlFunctionShortcut; | ||
lower: SqlFunctionShortcut; | ||
} | ||
@@ -73,0 +83,0 @@ |
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
614921
19167