Hi, I'm trying to get the latest pg8000 driver to pass the SQLAlchemy
dialect tests. I'm stuck on the following test in test_types.py:
def test_crit_against_string_coerce_type(self):
name = self.tables.data_table.c.name
col = self.tables.data_table.c['data']
self._test_index_criteria(
and_(name == 'r6',
cast(col["b"], String) == type_coerce("some value", JSON)),
"r6",
test_literal=False
)
This executes the following SQL:
SELECT data_table.name
FROM data_table
WHERE data_table.name = %s AND CAST((data_table.data -> %s) AS VARCHAR) =
%s ('r6', 'b', 'some value')
the problem is that the:
CAST((data_table.data -> %s) AS VARCHAR)
gives '"some value"', which of course doesn't equal 'some value', and so
the test fails. I'm not sure what I need to fix in the driver to make it
work, so any help is greatly appreciated.
Thanks,
Tony.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.