Skip to content
This repository

add quotes around key to allow mixed-case to work correctly #127

Merged
merged 1 commit into from almost 2 years ago

2 participants

Clark Laughlin Anatoliy Chakkaev
Clark Laughlin

This resolves issue #126 - fix to add quotes around key so that it works for mixed-case correctly

Clark Laughlin clarktlaugh Update lib/adapters/postgres.js
fix to add quotes around key so that it works for mixed-case correctly
f3bafd7
Anatoliy Chakkaev anatoliychakkaev merged commit d54cf8f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Sep 30, 2012
Clark Laughlin clarktlaugh Update lib/adapters/postgres.js
fix to add quotes around key so that it works for mixed-case correctly
f3bafd7
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/adapters/postgres.js
2  lib/adapters/postgres.js
@@ -237,7 +237,7 @@ PG.prototype.toFilter = function (model, filter) {
237 237 fields.push('"' + key + '" IS ' + filterValue);
238 238 } else if (conds[key].constructor.name === 'Object') {
239 239 var condType = Object.keys(conds[key])[0];
240   - var sqlCond = key;
  240 + var sqlCond = '"' + key + '"';
241 241 switch (condType) {
242 242 case 'gt':
243 243 sqlCond += ' > ';

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.