Skip to content

Instantly share code, notes, and snippets.

@whitelynx
Last active August 29, 2015 14:01
Show Gist options
  • Save whitelynx/247e79631750d1aefb12 to your computer and use it in GitHub Desktop.
Save whitelynx/247e79631750d1aefb12 to your computer and use it in GitHub Desktop.
OmegaDB examples/comments
//// Functions that return... ////
// ...queries: //
row.join('government.dim_state', {state_code: row.field('loc_state')})
// ...selectors: //
row.field('loc_state')
row.join('government.dim_state', {state_code: row.field('loc_state')}).field('state_abbrev')
// ...filters: //
field.eq(3)
row.eq('loc_state', 3)
row.filter({loc_state: 3})
// (boolean operators)
row.not.eq('loc_state', 3)
row.and(row.eq('loc_state', 3), row.eq('loc_cnty', 12))
row.or(row.eq('loc_state', 3), row.eq('loc_cnty', 12), row.not.eq('calc_acre', 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment