sqlalchemy.sqltypes.Boolean

Here are the examples of the python api sqlalchemy.sqltypes.Boolean taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

13 Examples 7

Example 1

Project: sqlalchemy_postgresql_json Source File: pgjson.py
        def _adapt_expression(self, op, other_comparator):
            if isinstance(op, custom_op):
                if op.opstring in ['->', '#>']:
                    return op, sqltypes.Boolean
                elif op.opstring in ['->>', '#>>']:
                    return op, sqltypes.String
            return sqltypes.Concatenable.Comparator. \
                _adapt_expression(self, op, other_comparator)

Example 2

Project: geoalchemy2 Source File: comparator.py
    def overlaps_or_to_left(self, other):
        """
        The ``&<`` operator. A's BBOX overlaps or is to the left of B's.
        """
        return self.operate(OVERLAPS_OR_TO_LEFT, other,
                            result_type=sqltypes.Boolean)

Example 3

Project: geoalchemy2 Source File: comparator.py
    def overlaps_or_to_right(self, other):
        """
        The ``&>`` operator. A's BBOX overlaps or is to the right of B's.
        """
        return self.operate(OVERLAPS_OR_TO_RIGHT, other,
                            result_type=sqltypes.Boolean)

Example 4

Project: geoalchemy2 Source File: comparator.py
    def overlaps_or_below(self, other):
        """
        The ``&<|`` operator. A's BBOX overlaps or is below B's.
        """
        return self.operate(OVERLAPS_OR_BELOW, other,
                            result_type=sqltypes.Boolean)

Example 5

Project: geoalchemy2 Source File: comparator.py
    def overlaps_or_above(self, other):
        """
        The ``|&>`` operator. A's BBOX overlaps or is to the right of B's.
        """
        return self.operate(OVERLAPS_OR_ABOVE, other,
                            result_type=sqltypes.Boolean)

Example 6

Project: geoalchemy2 Source File: comparator.py
Function: intersects
    def intersects(self, other):
        """
        The ``&&`` operator. A's BBOX intersects B's.
        """
        return self.operate(INTERSECTS, other, result_type=sqltypes.Boolean)

Example 7

Project: geoalchemy2 Source File: comparator.py
    def to_left(self, other):
        """
        The ``<<`` operator. A's BBOX is strictly to the left of B's.
        """
        return self.operate(TO_LEFT, other, result_type=sqltypes.Boolean)

Example 8

Project: geoalchemy2 Source File: comparator.py
Function: below
    def below(self, other):
        """
        The ``<<|`` operator. A's BBOX is strictly below B's.
        """
        return self.operate(BELOW, other, result_type=sqltypes.Boolean)

Example 9

Project: geoalchemy2 Source File: comparator.py
    def to_right(self, other):
        """
        The ``>>`` operator. A's BBOX is strictly to the right of B's.
        """
        return self.operate(TO_RIGHT, other, result_type=sqltypes.Boolean)

Example 10

Project: geoalchemy2 Source File: comparator.py
    def contained(self, other):
        """
        The ``@`` operator. A's BBOX is contained by B's.
        """
        return self.operate(CONTAINED, other, result_type=sqltypes.Boolean)

Example 11

Project: geoalchemy2 Source File: comparator.py
Function: above
    def above(self, other):
        """
        The ``|>>`` operator. A's BBOX is strictly above B's.
        """
        return self.operate(ABOVE, other, result_type=sqltypes.Boolean)

Example 12

Project: geoalchemy2 Source File: comparator.py
Function: contains
    def contains(self, other, **kw):
        """
        The ``~`` operator. A's BBOX contains B's.
        """
        return self.operate(CONTAINS, other, result_type=sqltypes.Boolean)

Example 13

Project: geoalchemy2 Source File: comparator.py
Function: same
    def same(self, other):
        """
        The ``~=`` operator. A's BBOX is the same as B's.
        """
        return self.operate(SAME, other, result_type=sqltypes.Boolean)