Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53081 > unrolled thread

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

Started byMohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
First post2013-08-27 22:24 +0430
Last post2013-08-27 22:24 +0430
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  which better for me?session.query or session.execute? Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-08-27 22:24 +0430

#53081 — which better for me?session.query or session.execute?

FromMohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
Date2013-08-27 22:24 +0430
Subjectwhich better for me?session.query or session.execute?
Message-ID<mailman.276.1377626096.19984.python-list@python.org>
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/18472314/which-better-session-query-or-session-execute-python-sqlalchemy

Yours,
Mohsen

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web