Skip to content

Commit 15ecdc3

Browse files
committed
Added support for values in an array
1 parent 2504f1a commit 15ecdc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/postgresql.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ PostgreSQL.prototype._buildWhere = function (model, where) {
528528
stmt.merge(sqlExp);
529529
} else {
530530
// The expression is field value, not a condition
531-
if (keys.length || p['0']) {
531+
if (keys.length || p.type[0]) {
532532
// The key is a nested properties
533533
columnValue = self.toColumnValue(p, expression);
534534
if (columnValue === null) {
@@ -626,12 +626,12 @@ PostgreSQL.prototype.toColumnValue = function (prop, val) {
626626
/*return null;*/
627627
}
628628
}
629-
if (Array.isArray(prop.type) && prop.type[0] === String) {
629+
/*if (Array.isArray(prop.type) && prop.type[0] === String) {
630630
return new ParameterizedSQL({
631631
sql: '@>',
632632
params: [JSON.stringify(val)],
633633
});
634-
}
634+
}*/
635635
if (prop.type === String) {
636636
return new ParameterizedSQL({
637637
sql: '?',

0 commit comments

Comments
 (0)