don't quote bool for cql

quoted bool is optional in table option DDL, and disallowed in CQL DML

PYTHON-596
This commit is contained in:
Adam Holmberg
2016-06-30 15:02:23 -05:00
parent 9b52af704b
commit 2242171bef

View File

@@ -40,8 +40,7 @@ def cql_quote(term):
# The ordering of this method is important for the result of this method to
# be a native str type (for both Python 2 and 3)
# Handle quoting of native str and bool types
if isinstance(term, (str, bool)):
if isinstance(term, str):
return "'%s'" % str(term).replace("'", "''")
# This branch of the if statement will only be used by Python 2 to catch
# unicode strings, text_type is used to prevent type errors with Python 3.