Feat add support of limit, offset, order #25

Merged
joeybaker merged 5 commits from add-filters into master 2016-10-21 18:10:35 +00:00
joeybaker commented 2016-10-21 00:21:35 +00:00 (Migrated from github.com)

Allows passing these as query params to list and scope methods.

There are a few small unrelated fixes in here as well.

Allows passing these as query params to list and scope methods. There are a few small unrelated fixes in here as well.
joeybaker commented 2016-10-21 00:21:51 +00:00 (Migrated from github.com)

@mdibaiee if you get a chance, let me know what you think!

@mdibaiee if you get a chance, let me know what you think!
mdibaiee (Migrated from github.com) reviewed 2016-10-21 08:57:55 +00:00
mdibaiee (Migrated from github.com) left a comment

@joeybaker Thanks Joey! looks fine to me except for the comment I had 😁 👍

@joeybaker Thanks Joey! looks fine to me except for the comment I had :grin: :+1:
mdibaiee (Migrated from github.com) commented 2016-10-21 08:56:49 +00:00

Just out of curiosity: why void 0?

Just out of curiosity: why `void 0`?
joeybaker (Migrated from github.com) reviewed 2016-10-21 09:10:54 +00:00
joeybaker (Migrated from github.com) commented 2016-10-21 09:10:54 +00:00

It's a (bad?) habit of mine from the bad old days of JS libs being of poor quality and accidentally (or intentionally!) overriding undefined with something else. Turns out, it's a micro-performance optimization to use void 0 and it is safer.

I also find that writing undefined is usually an anti-pattern (usually, you want null to express that the value is unset).

It's a (bad?) habit of mine from the bad old days of JS libs being of poor quality and accidentally (or intentionally!) overriding `undefined` with something else. Turns out, it's a micro-performance optimization to use `void 0` and it _is_ safer. I also find that writing `undefined` is usually an anti-pattern (usually, you want `null` to express that the value is unset).
mdibaiee (Migrated from github.com) reviewed 2016-10-21 09:14:18 +00:00
mdibaiee (Migrated from github.com) commented 2016-10-21 09:14:18 +00:00

Oh, you might be surprised to know that I didn't know it would return undefined, I mean I've never seen void anywhere before 😁, is there a problem with null here?

Oh, you might be surprised to know that I didn't know it would return `undefined`, I mean I've never seen `void` anywhere before :grin:, is there a problem with `null` here?
joeybaker (Migrated from github.com) reviewed 2016-10-21 18:04:40 +00:00
joeybaker (Migrated from github.com) commented 2016-10-21 18:04:39 +00:00

Well… sorta, it makes https://github.com/mdibaiee/hapi-sequelize-crud/pull/25/files#diff-e23df694a8f901b18511b648fe2416b9R202 harder if it's null. I can re-work this though.

Well… sorta, it makes https://github.com/mdibaiee/hapi-sequelize-crud/pull/25/files#diff-e23df694a8f901b18511b648fe2416b9R202 harder if it's `null`. I can re-work this though.
joeybaker commented 2016-10-21 18:10:39 +00:00 (Migrated from github.com)

Merging!

Merging!
joeybaker commented 2016-10-21 18:12:03 +00:00 (Migrated from github.com)

Released as 2.7.0

Released as 2.7.0
mdibaiee commented 2016-10-21 18:55:06 +00:00 (Migrated from github.com)

@joeybaker Thanks! 👍

@joeybaker Thanks! :+1:
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: thereadme/hapi-sequelize-crud#25
No description provided.