This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
No gems have been built for this project yet.
dm-more / dm-querizer
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
History.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
LICENSE | Thu Jun 19 05:06:00 -0700 2008 | [somebee] |
| |
Manifest.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
README.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
Rakefile | Thu Jul 24 14:00:08 -0700 2008 | [bernerdschaefer] |
| |
TODO | Thu Jun 19 05:06:00 -0700 2008 | [somebee] |
| |
lib/ | Tue Aug 26 15:25:51 -0700 2008 | [bernerdschaefer] |
| |
spec/ | Tue Aug 26 15:25:51 -0700 2008 | [bernerdschaefer] |
README.txt
= dm-querizer
DataMapper plugin that provides a short rubyish query-syntax.
When this plugin is loaded you can supply blocks to #all and #first. Ordinary hashes
still work, so you do not lose any functionality.
Old: User.all( :name => 'john', :age.gt => 20 )
New: User.all{ name == 'john' && age > 20 }
Old: User.all( :age.gte => 35, :name.like => 'mark%' )
New: User.all{ age >= 35 && name =~ 'mark%' }
You can also use ';' instead of '&&' for even shorter queries.
User.all{ name == 'john' && age > 20 }
User.all{ name == 'john'; age > 20 }
The plugin is still very much experimental. != is not working (and might never work).
Instead you can use '~';
Old: User.all( :name.not => 'mark' )
New: User.all{ name ~ 'mark' }




