Python sqlalchemy.sql.operators.concat_op() Examples
The following are 11
code examples of sqlalchemy.sql.operators.concat_op().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
sqlalchemy.sql.operators
, or try the search function
.
Example #1
Source File: test_operators.py From sqlalchemy with MIT License | 6 votes |
def test_concatenable_adapt(self): class TypeOne(Concatenable, TypeEngine): pass class TypeTwo(Concatenable, TypeEngine): pass class TypeThree(TypeEngine): pass expr = column("x", TypeOne()) - column("y", TypeTwo()) is_(expr.type._type_affinity, TypeOne) is_(expr.operator, operator.sub) expr = column("x", TypeOne()) + column("y", TypeTwo()) is_(expr.type._type_affinity, TypeOne) is_(expr.operator, operators.concat_op) expr = column("x", TypeOne()) - column("y", TypeThree()) is_(expr.type._type_affinity, TypeOne) is_(expr.operator, operator.sub) expr = column("x", TypeOne()) + column("y", TypeThree()) is_(expr.type._type_affinity, TypeOne) is_(expr.operator, operator.add)
Example #2
Source File: sqltypes.py From planespotter with MIT License | 5 votes |
def _adapt_expression(self, op, other_comparator): if (op is operators.add and isinstance( other_comparator, (Concatenable.Comparator, NullType.Comparator) )): return operators.concat_op, self.expr.type else: return super(Concatenable.Comparator, self)._adapt_expression( op, other_comparator)
Example #3
Source File: sqltypes.py From planespotter with MIT License | 5 votes |
def _adapt_expression(self, op, other_comparator): op, typ = super(Enum.Comparator, self)._adapt_expression( op, other_comparator) if op is operators.concat_op: typ = String( self.type.length, convert_unicode=self.type.convert_unicode) return op, typ
Example #4
Source File: sqltypes.py From pyRevit with GNU General Public License v3.0 | 5 votes |
def _adapt_expression(self, op, other_comparator): if (op is operators.add and isinstance( other_comparator, (Concatenable.Comparator, NullType.Comparator) )): return operators.concat_op, self.expr.type else: return super(Concatenable.Comparator, self)._adapt_expression( op, other_comparator)
Example #5
Source File: sqltypes.py From pyRevit with GNU General Public License v3.0 | 5 votes |
def _adapt_expression(self, op, other_comparator): op, typ = super(Enum.Comparator, self)._adapt_expression( op, other_comparator) if op is operators.concat_op: typ = String( self.type.length, convert_unicode=self.type.convert_unicode) return op, typ
Example #6
Source File: sqltypes.py From sqlalchemy with MIT License | 5 votes |
def _adapt_expression(self, op, other_comparator): if op is operators.add and isinstance( other_comparator, (Concatenable.Comparator, NullType.Comparator), ): return operators.concat_op, self.expr.type else: return super(Concatenable.Comparator, self)._adapt_expression( op, other_comparator )
Example #7
Source File: sqltypes.py From sqlalchemy with MIT License | 5 votes |
def _adapt_expression(self, op, other_comparator): op, typ = super(Enum.Comparator, self)._adapt_expression( op, other_comparator ) if op is operators.concat_op: typ = String( self.type.length, _expect_unicode=self.type._expect_unicode ) return op, typ
Example #8
Source File: sqltypes.py From jarvis with GNU General Public License v2.0 | 5 votes |
def _adapt_expression(self, op, other_comparator): if (op is operators.add and isinstance( other_comparator, (Concatenable.Comparator, NullType.Comparator) )): return operators.concat_op, self.expr.type else: return super(Concatenable.Comparator, self)._adapt_expression( op, other_comparator)
Example #9
Source File: sqltypes.py From jarvis with GNU General Public License v2.0 | 5 votes |
def _adapt_expression(self, op, other_comparator): op, typ = super(Enum.Comparator, self)._adapt_expression( op, other_comparator) if op is operators.concat_op: typ = String( self.type.length, convert_unicode=self.type.convert_unicode) return op, typ
Example #10
Source File: sqltypes.py From android_universal with MIT License | 5 votes |
def _adapt_expression(self, op, other_comparator): if (op is operators.add and isinstance( other_comparator, (Concatenable.Comparator, NullType.Comparator) )): return operators.concat_op, self.expr.type else: return super(Concatenable.Comparator, self)._adapt_expression( op, other_comparator)
Example #11
Source File: sqltypes.py From android_universal with MIT License | 5 votes |
def _adapt_expression(self, op, other_comparator): op, typ = super(Enum.Comparator, self)._adapt_expression( op, other_comparator) if op is operators.concat_op: typ = String( self.type.length, convert_unicode=self.type.convert_unicode) return op, typ