def visit_binary(self, binary):
result = self.get_str(binary.left)
if binary.operator is not None:
- result += " " + binary.operator
+ result += " " + self.binary_operator_string(binary)
result += " " + self.get_str(binary.right)
if binary.parens:
result = "(" + result + ")"
self.strings[binary] = result
+ def binary_operator_string(self, binary):
+ return binary.operator
+
def visit_bindparam(self, bindparam):
if bindparam.shortname != bindparam.key:
self.binds[bindparam.shortname] = bindparam
text += " \n LIMIT -1"
text += " OFFSET " + str(select.offset)
return text
-
+ def binary_operator_string(self, binary):
+ if isinstance(binary.type, sqltypes.String) and binary.operator == '+':
+ return '||'
+ else:
+ return ansisql.ANSICompiler.binary_operator_string(self, binary)
class SQLiteSchemaGenerator(ansisql.ANSISchemaGenerator):
def get_column_specification(self, column, override_pk=False, **kwargs):