{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/90","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/90/comments","events_url":"https://api.github.com/repos/strongloop/loopback-connector-postgresql/issues/90/events","html_url":"https://github.com/strongloop/loopback-connector-postgresql/issues/90","id":88400298,"number":90,"title":"Enabling RegExp as a valid condition","user":{"login":"nicolasembleton","id":1546148,"avatar_url":"https://avatars.githubusercontent.com/u/1546148?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasembleton","html_url":"https://github.com/nicolasembleton","followers_url":"https://api.github.com/users/nicolasembleton/followers","following_url":"https://api.github.com/users/nicolasembleton/following{/other_user}","gists_url":"https://api.github.com/users/nicolasembleton/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasembleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasembleton/subscriptions","organizations_url":"https://api.github.com/users/nicolasembleton/orgs","repos_url":"https://api.github.com/users/nicolasembleton/repos","events_url":"https://api.github.com/users/nicolasembleton/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasembleton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-15T11:45:59Z","updated_at":"2015-06-15T11:45:59Z","closed_at":null,"body":"Hi, \r\n\r\nBackground: I'm trying to run queries that will do some very lightweight search, or that will not pain me with case sensitivity problems\r\n\r\nIn the postgresql.js I can see that the RegExp query parsing seem working but I can't get it to work:\r\n```javascript\r\nPostgreSQL.prototype.buildExpression =\r\n  function (columnName, operator, columnValue, propertyValue) {\r\n    console.log('Building expression from the PGSQL client');\r\n\r\n    if (propertyValue instanceof RegExp) {\r\n      columnValue = \"'\" + propertyValue.source + \"'\";\r\n      if (propertyValue.ignoreCase) {\r\n        return new ParameterizedSQL(columnName + ' ~* ?', [columnValue]);\r\n      } else {\r\n        return new ParameterizedSQL(columnName + ' ~ ?', [columnValue]);\r\n      }\r\n    }\r\n```\r\n\r\nIt seems the loopback-connector package isn't totally ready for it either and the query doesn't seem to run well in the end. \r\n\r\nIs that something normal? Is there a known workaround? (couldn't find it). "}}