How to use the sqlobject.sqlbuilder.SQLOp function in SQLObject

To help you get started, we’ve selected a few SQLObject examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sqlobject / sqlobject / tests / test_converters.py View on Github external
def test_op(self):
        instance = SQLOp('and', 'this', 'that')
        self.assertEqual(sqlrepr(instance), repr(instance))
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def AND(*ops):
    if not ops:
        return None
    op1 = ops[0]
    ops = ops[1:]
    if ops:
        return SQLOp("AND", op1, AND(*ops))
    else:
        return op1
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def __rfloordiv__(self, other):
        return SQLConstant("FLOOR")(SQLOp("/", other, self))
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def __ne__(self, other):
        if other is None:
            return ISNOTNULL(self)
        else:
            return SQLOp("<>", self, other)
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def ISNULL(expr):
    return SQLOp("IS", expr, None)
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def OR(*ops):
    if not ops:
        return None
    op1 = ops[0]
    ops = ops[1:]
    if ops:
        return SQLOp("OR", op1, OR(*ops))
    else:
        return op1
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def __sub__(self, other):
        return SQLOp("-", self, other)
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def __gt__(self, other):
        return SQLOp(">", self, other)
github sqlobject / sqlobject / sqlobject / sqlbuilder.py View on Github external
def _IN(item, list):
    return SQLOp("IN", item, list)