Skip to content

Commit

Permalink
Support for neq in query predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cromberge committed Aug 3, 2016
1 parent 57f6246 commit 15d4a20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/query_builder.erl
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ build_tag_lookup({'=', {tag, NS, K}, V}, NIn, Vals) ->
" namespace = $", i2l(NIn),
" AND name = $", i2l(NIn+1),
" AND value = $", i2l(NIn+2), ")"],
{NIn+3, [NS, K, V | Vals], Str};
build_tag_lookup({'!=', {tag, NS, K}, V}, NIn, Vals) ->
Str = ["id NOT IN (SELECT metric_id FROM " ?DIM_TABLE " WHERE ",
" namespace = $", i2l(NIn),
" AND name = $", i2l(NIn+1),
" AND value = $", i2l(NIn+2), ")"],
{NIn+3, [NS, K, V | Vals], Str}.

grouping_names(0) ->
Expand Down

0 comments on commit 15d4a20

Please sign in to comment.