Socket
Socket
Sign inDemoInstall

objection

Package Overview
Dependencies
Maintainers
2
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

objection - npm Package Compare versions

Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6

10

lib/queryBuilder/FunctionBuilder.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc