Created
April 7, 2016 23:52
-
-
Save terrancesnyder/a77638e343fadb4e8240a45fe37e6107 to your computer and use it in GitHub Desktop.
rethinkdb_merge_pushdown_crazy.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r.db('test') | |
.table('templates') | |
.filter({ network: { id: 'USA-0034' } }) | |
.concatMap(function(d) { | |
return d('layers').do(function(l) { | |
return l.merge({ template: d('id') }) | |
}); | |
}) | |
.filter({ image_var: 'product_shot_url' }) | |
.map(function(d) { | |
return { | |
template: d('template'), | |
left: d('object')('left'), | |
top: d('object')('top'), | |
oX: d('object')('originX'), | |
oy: d('object')('originY') | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment