updated package dependencies, implemented "or null" operator for WHERE clauses, added support for auto created/updated timestamp columns #29

wants to merge 5 commits into


None yet

4 participants


I've updated all the dependencies of FastLegS so that it works correctly with Node 0.6.0+.

I added an "or null" operator for WHERE clauses so you can say things like "value is 0 or null". I think this is a pretty common use case, and it was impossible to express before. Example of how it is used:

      "indexed_at.lte.or_null": indexTime
      only: [ 'id' ]

This will return all rows where the "indexed_at" column is before indexTime or "indexed_at" is NULL.

My third change is support for automatically setting created and updated time stamps for each row. You configure them like so:

exports.Feed = FastLegS.Base.extend({
  tableName: "feeds",
  primaryKey: "id",
  updateTimestamp: "updated_at",
  createTimestamp: "created_at"

The column names can be whatever you want, in this example I use the Ruby nomenclature of "updated_at" and "created_at" as the column names. You don't have to specify both created and updated. Every time you issue a create() or update() call, the relevant column will be updated (in the case of create(), update is also set to the same time).




Hi, can you please let me know why you have elected not to merge this pull request? If there's anything I can do to assist, I'd be happy to. I've been using my forked version for development for about a year, and I'd really like to be able to get back on mainline.

Didit Technology Team member

Sorry about the crazy delay. This pull request was probably overlooked. I'm not going to merge these changes because they have no tests. Please submit another pull request with tests and we will get on it. Thanks.

@thadclay thadclay closed this Feb 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment