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
3
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)
3
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)
3
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)
3
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)
3
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)
0
Example 6
def intersects(self, other):
"""
The ``&&`` operator. A's BBOX intersects B's.
"""
return self.operate(INTERSECTS, other, result_type=sqltypes.Boolean)
0
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)
0
Example 8
def below(self, other):
"""
The ``<<|`` operator. A's BBOX is strictly below B's.
"""
return self.operate(BELOW, other, result_type=sqltypes.Boolean)
0
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)
0
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)
0
Example 11
def above(self, other):
"""
The ``|>>`` operator. A's BBOX is strictly above B's.
"""
return self.operate(ABOVE, other, result_type=sqltypes.Boolean)
0
Example 12
def contains(self, other, **kw):
"""
The ``~`` operator. A's BBOX contains B's.
"""
return self.operate(CONTAINS, other, result_type=sqltypes.Boolean)
0
Example 13
def same(self, other):
"""
The ``~=`` operator. A's BBOX is the same as B's.
"""
return self.operate(SAME, other, result_type=sqltypes.Boolean)