@imatic/pgqb
Advanced tools
Comparing version 0.1.20 to 0.1.21
@@ -58,2 +58,3 @@ import * as qb from './qb'; | ||
ilike: (expr1: qb.ExprOperand, expr2: qb.ExprOperand) => qb.Expr; | ||
overlaps: (expr1: qb.ExprOperand, expr2: qb.ExprOperand) => qb.Expr; | ||
and: (expr: qb.Expr, ...exprs: qb.Expr[]) => qb.Expr; | ||
@@ -60,0 +61,0 @@ or: (expr: qb.Expr, ...exprs: qb.Expr[]) => qb.Expr; |
@@ -180,2 +180,3 @@ "use strict"; | ||
ilike: binaryExprHandler('ilike'), | ||
overlaps: binaryExprHandler('&&'), | ||
and: (expr, ...exprs) => [ | ||
@@ -182,0 +183,0 @@ 'and', |
@@ -11,3 +11,3 @@ export interface InlineParam { | ||
export declare type UnaryOperator = 'null' | 'not_null'; | ||
export declare type BinaryOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'as' | 'like' | 'ilike'; | ||
export declare type BinaryOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'as' | 'like' | 'ilike' | '&&'; | ||
export declare type VarOperator = 'and' | 'or' | 'case_when' | 'in' | 'not_in'; | ||
@@ -14,0 +14,0 @@ export interface FunctionCall extends Array<any> { |
@@ -220,2 +220,3 @@ "use strict"; | ||
'<=': binaryOperatorHandler('<='), | ||
'&&': binaryOperatorHandler('&&'), | ||
as: binaryOperatorHandler('as'), | ||
@@ -222,0 +223,0 @@ '%': (f, ...args) => sql_template_strings_1.SQL `` |
{ | ||
"name": "@imatic/pgqb", | ||
"version": "0.1.20", | ||
"version": "0.1.21", | ||
"description": "Functional PostgreSQL query builder", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -214,2 +214,3 @@ import * as qb from './qb'; | ||
ilike: binaryExprHandler('ilike'), | ||
overlaps: binaryExprHandler('&&'), | ||
and: (expr: qb.Expr, ...exprs: qb.Expr[]): qb.Expr => [ | ||
@@ -216,0 +217,0 @@ 'and', |
@@ -29,3 +29,4 @@ import * as r from 'ramda'; | ||
| 'like' | ||
| 'ilike'; | ||
| 'ilike' | ||
| '&&'; | ||
@@ -365,2 +366,3 @@ export type VarOperator = 'and' | 'or' | 'case_when' | 'in' | 'not_in'; | ||
'<=': binaryOperatorHandler('<='), | ||
'&&': binaryOperatorHandler('&&'), | ||
as: binaryOperatorHandler('as'), | ||
@@ -367,0 +369,0 @@ '%': (f, ...args) => |
@@ -173,3 +173,4 @@ import {expect} from 'chai'; | ||
h.expr.ilike('t1.c', h.val.inlineParam('%text%')), | ||
h.expr.notIn('t.code', [h.val.inlineParam('red')]) | ||
h.expr.notIn('t.code', [h.val.inlineParam('red')]), | ||
h.expr.overlaps('t1.c', 't2.c') | ||
]) | ||
@@ -203,2 +204,3 @@ ), | ||
['not_in', 't.code', {ip: 'red'}], | ||
['&&', 't1.c', 't2.c'], | ||
], | ||
@@ -205,0 +207,0 @@ }, |
@@ -163,2 +163,3 @@ import {expect} from 'chai'; | ||
['not_in', 't.code', {ip: 'red'}], | ||
['&&', 't1.c', 't2.c'], | ||
], | ||
@@ -187,3 +188,4 @@ }, | ||
` "t1"."c" ILIKE $7,` + | ||
` "t"."code" NOT IN($8)`, | ||
` "t"."code" NOT IN($8),` + | ||
` "t1"."c" && "t2"."c"`, | ||
values: [ | ||
@@ -190,0 +192,0 @@ null, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
90021
2059