This question already has an answer here:
- Can I use SQLAlchemy with Cassandra CQL? 3 answers
I am using SQLAlchemy Core with PostgreSQL, but I'm also using the Non-SQL db Cassandra, and I would like to keep using the SQLAlchemy's query builder with Cassandra, cause his CQL language is quite similar in most cases. The thing is, when I am trying to run a statement like this:
stmt = select([users.c.name]).select_from(users).where(users.c.id == id)
I am getting this query as result:
SELECT name FROM users WHERE users.id == :id
Is there a way in SQLAlchemy to get the id in the WHERE clause without the table prefix: users.id, so the queries can work also in Cassandra?
Parsing text afterwards is not allowed!
Thanks
Aucun commentaire:
Enregistrer un commentaire