Skip to content

Instantly share code, notes, and snippets.

View plajjan's full-sized avatar

Kristian Larsson plajjan

View GitHub Profile
Simple dictSQL to match on one column using the equal operator. val1 contains name of column/attribute name of prefix to match while val2 contains the value it should match using the specified operator.
dictSQL = {
'val1': 'description',
'operator': 'equals',
'val2': 'bar'
}
Expands to:
description = 'bar'
query_parts.append({
'operator': 'or',
'val1': {
'operator': 'or',
'val1': {
'operator': 'or',
'val1': {
'operator': 'or',
'val1': {
'operator': 'regex_match',