which better for me?session.query or session.execute?

  • Thread starter Mohsen Pahlevanzadeh
  • Start date
M

Mohsen Pahlevanzadeh

Dear all,


Suppose I want to write a function for better using SQLAlchemly
dynamically with the following specification:

1. It get field names and values.
2. It get operators such as = , <> , like , between and so on.
3. It get logical operators such as and , or and not.
4. ....
5. ....

I need it for update query ,select ,join and delete.

I read the following stackoverflow link:

SQLAlchemy Flask filter query to combine results from two models

SQLAlchemy Query and_/or_ Issue

sqlalchemy filter multiple columns

How do I specify a relation in SQLAlchemy where one condition requires a
column to be null?

In sqlalchemy, how can I combine two queries by having a column entry
identical?

My Question:
I neeed to write a string and concatenite above params, which are
better? session.query or set of function such as update, delete and so
on that run by execute function?


You'll make me happy if answer in http://stackoverflow.com :
http://stackoverflow.com/questions/...on-query-or-session-execute-python-sqlalchemy

Yours,
Mohsen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top