@imatic/pgqb
Advanced tools
Comparing version 0.1.27 to 0.1.28
@@ -59,5 +59,9 @@ "use strict"; | ||
* escape('table'); //=> '"table"' | ||
* excape('t'.'id'); //=> '"t"."id"' | ||
* escape('t.id'); //=> '"t"."id"' | ||
* escape('"t"."id"'); //=> '"t"."id"' | ||
*/ | ||
function escape(identifier) { | ||
if (identifier[0] === '"') { | ||
return identifier; | ||
} | ||
return identifier | ||
@@ -64,0 +68,0 @@ .split('.') |
{ | ||
"name": "@imatic/pgqb", | ||
"version": "0.1.27", | ||
"version": "0.1.28", | ||
"description": "Functional PostgreSQL query builder", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -150,5 +150,10 @@ import {SQL, SQLStatement} from 'sql-template-strings'; | ||
* escape('table'); //=> '"table"' | ||
* excape('t'.'id'); //=> '"t"."id"' | ||
* escape('t.id'); //=> '"t"."id"' | ||
* escape('"t"."id"'); //=> '"t"."id"' | ||
*/ | ||
function escape(identifier: string): string { | ||
if (identifier[0] === '"') { | ||
return identifier; | ||
} | ||
return identifier | ||
@@ -155,0 +160,0 @@ .split('.') |
@@ -100,3 +100,3 @@ import {expect} from 'chai'; | ||
h.join('table2', 't2', h.expr.eq('t2.id', 't.id')), | ||
h.join('table3', 't3', h.expr.eq('t3.id', 't.id')), | ||
h.join('table3', 't3', h.expr.eq('"t3"."id"', 't.id')), | ||
h.leftJoin( | ||
@@ -128,3 +128,3 @@ 'leftTable', | ||
['INNER', ['table2', 't2'], ['=', 't2.id', 't.id']], | ||
['INNER', ['table3', 't3'], ['=', 't3.id', 't.id']], | ||
['INNER', ['table3', 't3'], ['=', '"t3"."id"', 't.id']], | ||
['LEFT', ['leftTable', 't4'], ['=', 't4.id', 't.id']], | ||
@@ -131,0 +131,0 @@ ], |
@@ -99,3 +99,3 @@ import {expect} from 'chai'; | ||
['INNER', ['table2', 't2'], ['=', 't2.id', 't.id']], | ||
['INNER', ['table3', 't3'], ['=', 't3.id', 't.id']], | ||
['INNER', ['table3', 't3'], ['=', '"t3"."id"', 't.id']], | ||
], | ||
@@ -102,0 +102,0 @@ where: [ |
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
97904
22
2253