How check select query execution time using sqlalchemy.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
Hi,
in my project, I use onupdate attribute :
foobar_table = Table(FooBar, meta.metadata,
...
Column(created, DateTime(), default=datetime.datetime.now),
Column(modified, DateTime(), default=datetime.datetime.now,
onupdate=datetime.datetime.now),
...
)
All work great.
However, my
Hi Michael,
Am Mittwoch, den 27.10.2010, 13:37 -0400 schrieb Michael Bayer:
Configuration is too unwieldy ? Since you're using declarative ,
just using @declared_attr would give you access to the class:
Nice one. I missed classproperty and declared_attr so far.
def make_ordered_list(key,
I got a problem with PostGreSQL 8.4 and tables reflection. My metadata
object seems to be ok (it has foreign keys, primary keys, every
columns and tables). But when I try to associate an object to an
another one through a Foreign key, I get :
sqlalchemy.exc.ProgrammingError: (ProgrammingError)
On 10/28/2010 06:57 AM, Fabien wrote:
I got a problem with PostGreSQL 8.4 and tables reflection. My metadata
object seems to be ok (it has foreign keys, primary keys, every
columns and tables). But when I try to associate an object to an
another one through a Foreign key, I get :
Not sure on this one, but are you passing a formatted date string? Maybe you
should set a datetime object directly and let SA do the string conversion
during flush.
Alex
Sent from my fantastic HTC Hero
On Oct 28, 2010 1:41 AM, KLEIN Stéphane klein.steph...@gmail.com wrote:
Hi,
in my project,
Easiest way is to turn on logging using timestamps.
A more integrative approach:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Profiling
Also see:
http://stackoverflow.com/questions/1171166/how-can-i-profile-a-sqlalchemy-powered-application/1175677#1175677
On Oct 28, 2010, at 3:38 AM,
On Oct 28, 2010, at 5:20 AM, Torsten Landschoff wrote:
Hi Michael,
Am Mittwoch, den 27.10.2010, 13:37 -0400 schrieb Michael Bayer:
Configuration is too unwieldy ? Since you're using declarative ,
just using @declared_attr would give you access to the class:
Nice one. I missed
Hi Michael,
Am Donnerstag, den 28.10.2010, 11:36 -0400 schrieb Michael Bayer:
Then the mapper is constructed which immediately replaces your function with
an ORM instrumented attribute. So basically yes its a one shot.
Thanks for the clarification.
Greetings, Torsten
--
DYNAmore
I actually have this same issue as well..
I have a field that means the record has been tested. Any updates to the
field make tested = False, all except for one other field. However when I
updated that field and this field it still gets reset to false..
record.approved=True
record.tested=True
The only way around this is to do two separate commits
record.approved = True
db.session.commit()
record.tested = True
db.session.commit()
record.approved is True
record.tested is True
--
Thadeus
On Thu, Oct 28, 2010 at 2:22 PM, Thadeus Burgess thade...@thadeusb.comwrote:
I actually have
again, no reason why that should be the case from an ORM perspective, please
provide a succinct and full working test case and I can evaluate what you're
doing.
On Oct 28, 2010, at 3:24 PM, Thadeus Burgess wrote:
The only way around this is to do two separate commits
record.approved = True
Hey guys,
I have a doubt. I need to get the data from the sever twice every time
when I load a page, one to render the HTML and another one to get the
data for client side (javascript).
So I don't know exactly what it's the best way and fastest. I was
trying to implement a session object and
hello all
I want to know how to create Session with object_session which can be used
to add data to the database i.e using Session.add_all().So i can pass a list
as parameter to add_all as my length of list is of variable length. When i
am trying to do that i was not able to associate instance
On 10/28/2010 08:16 PM, anusha k wrote:
hello all
I want to know how to create Session with object_session which can be
used to add data to the database i.e using Session.add_all().So i can
pass a list as parameter to add_all as my length of list is of
variable length. When i am trying to do
15 matches
Mail list logo