balderdashy / waterline-sequel

A SQL generator for use in Waterline Adapters
MIT License
16 stars 61 forks source link

Feature/nested filter alias #44

Closed RWOverdijk closed 9 years ago

RWOverdijk commented 9 years ago

Feature/nested filter alias

Fixed a bug

I've fixed a bug where object based operators on the actual property value caused undefined as a value. Basically:

var criteria = {
  associationName : {'>' 5}
};

killed the query. I've solved this in the easiest way, by checking if the supplied key is an operator.

Alias based nested filtering

I've added support or alias based filtering. It's minor, but requested by @wayne-o. This feature essentially allows you to supply nested criteria, using the columnName as a key in stead of the property's key.

RWOverdijk commented 9 years ago

@dmarcelino This fixes a pretty serious bug.

dmarcelino commented 9 years ago

Is this the fix to the columnName issue brought up by @wayne-o on https://github.com/balderdashy/waterline-sequel/pull/27#issuecomment-93919972?

UPDATE: ignore this, just read https://github.com/balderdashy/waterline-sequel/pull/27#issuecomment-95184244.

dmarcelino commented 9 years ago

I don't see anything wrong with this, looks good. :white_check_mark:

@devinivy, @tjwebb what do you think? Should we try to include this on 0.3.1?

wayne-o commented 9 years ago

I'll test this and let you guys know if it fixes my issue

On Wed, Apr 22, 2015 at 3:08 PM, Dário notifications@github.com wrote:

I don't see anything wrong with this, looks good. @devinivy https://github.com/devinivy, @tjwebb https://github.com/tjwebb what do you think? Should we try to include this on 0.3.1?

— Reply to this email directly or view it on GitHub https://github.com/balderdashy/waterline-sequel/pull/44#issuecomment-95192606 .

--------------------

w://

t: 07508 215 459

--------------------

dmarcelino commented 9 years ago

Any luck @wayne-o?

tjwebb commented 9 years ago

Looks awesome.

dmarcelino commented 9 years ago

Thanks @RWOverdijk and @tjwebb!