Skip to content

Instantly share code, notes, and snippets.

@makotoworld
Created October 11, 2012 14:40
Show Gist options
  • Save makotoworld/3872857 to your computer and use it in GitHub Desktop.
Save makotoworld/3872857 to your computer and use it in GitHub Desktop.
peewee
q_op_map = {
OP_EQ: '=',
OP_LT: '<',
OP_LTE: '<=',
OP_GT: '>',
OP_GTE: '>=',
OP_NE: '!=',
OP_IN: 'IN',
OP_IS: 'IS',
OP_LIKE: 'LIKE',
OP_ILIKE: 'ILIKE',
}
== x equals y
< x is less than y
<= x is less than or equal to y
> x is greater than y
>= x is greater than or equal to y
!= x is not equal to y
<< x IN y, where y is a list or query
>> x IS y, where y is None/NULL
% x LIKE y where y may contain wildcards
** x ILIKE y where y may contain wildcards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment