Wichert Akkerman wich...@wiggy.net writes:
How does your code differ from
https://pypi.python.org/pypi/psycopg2-dateutils ?
Ah, I skipped that second URL earlier and only looked through the SO
discussion...
I guess two major differences I see are that psycopg2-dateutils
appears to only
Sibylle Koczian nulla.epist...@web.de writes:
Exactly, that's it. The stackoverflow discussion was very instructive,
thank you! I'll try out psycopg2-dateutils.
I'm a big fan of dateutil. If you do use it, you may also choose to
bypass the use of timedelta entirely, since as you've seen it
Jonathan Vanasco jonat...@findmeon.com writes:
in postgresql i have a boolean field that allows Null values.
i'd like to query for the items that are not 'true'
filter( tablename.is_deleted != True )
creates this sql:
is_deleted != True
however this is incorrect and doesn't match
Kuze kuze.to...@gmail.com writes:
I'm also aware of `reflection` capability provided. However, it'd be
hitting the database with a query to grab the necessary data points
for generating the schema. For production, hitting the db when using
reflection does not sound compelling.
With my
I ran into a small problem attempting to union two existing Query instances
together, where one that was using some custom parameters seemed to lose the
parameter information when incorporated into a higher level query making
use of from_statement. This is with SA 0.5.8.
Given these two starting
Hopefully this won't just be a section in the manual I missed, but I'm
having some difficulties constructing an ORM query while using correlated
sub-queries within filter(). This is with SA 0.5.8.
Given the following tables (with just the relevant columns shown):
attendance (
Michael Bayer mike...@zzzcomputing.com writes:
if the issue is that you have a query(), and you like to say
somequery.filter(q == x), you'd turn query() into a subquery
(i.e. an alisaed SQLAlchemy expression object) using q.subquery(),
and then into a scalar subquery using as_scalar(), which
Rob robert.sudwa...@googlemail.com writes:
However, importing [or trying to instantiate this class] will fail
until the connection is in place ie the class as it stands cannot be
called until a valid engine is bound. I'm guessing that something
will need to be passed to an __init__ in the
Don Dwiggins d...@dondwiggins.net writes:
Hmmm, Could you elaborate a bit about the self-contained? I do have
some cases where I fire off a deferredList with several (independent)
queries in it. Might that be problematic?
My guess is that your independent comment is essentially the same
Don Dwiggins d...@dondwiggins.net writes:
Doing some exploration on the intersection of Twisted and SA, I came
across a message by David Bolen in February of 2007, describing a
simple database class that contained a background thread for
execution. I'd like to know if that work, or some
Has anyone generated ORM queries using the OVERLAPS SQL operator that
reference columns in the tables in the query? I've been experimenting
with various approaches and can't seem to cleanly get the column names
(with their appropriate alias based on the rest of the query) into the
overlaps
Ants Aasma ants.aa...@gmail.com writes:
This is something that could be improved in SQLAlchemy, but as a
workaround you can use the compiler extension to create the support
yourself. Here's some example code. It uses some private internals
from SQLAlchemy so you need to keep an eye on it
Adrian von Bidder avbid...@fortytwo.ch writes:
Ideas comments?
For what it's worth, I'd think that the best sort of audit would be
something done in the database itself, since it would audit any
changes whether done through any interface.
It depends on the database involved, but for example,
This feels like something that I ought to be able to find already
answered somewhere but I've been searching the archives and the
documentation and haven't been able to discover it.
Is it possible to construct an ORM query that includes eagerloaded
related objects such that the outer joins due
Michael Bayer mike...@zzzcomputing.com writes:
http://www.sqlalchemy.org/docs/05/mappers.html?highlight=contains_eager#routing-explicit-joins-statements-into-eagerly-loaded-collections
Ok, that's embarrassing... I even recall skimming that section, but
now looking at it can't for the life of
Michael Bayer [EMAIL PROTECTED] writes:
4. global_connect() / default_metadata
(...)
(...) Plus it used DynamicMetaData which
is a totally misunderstood object that isnt going away but will be
much more downplayed. youre responsible for your own MetaData
jason kirtland [EMAIL PROTECTED] writes:
DynamicMetaData is not deprecated, but it may be renamed in 0.4 to
clarify its role. For this setup, a MetaData will suffice- it is
dynamic as in late binding and re-bindable. After you get your
engine sorted out, you can connect() the engine and
This seems like it would be a very common scenario, but it's got me
stumped and feeling a bit stupid at the moment - I would appreciate
anyone helping to point me in the right direction.
I'm using the ORM for a many-to-many relationship, for which over time
I need to be able to prune individual
Michael Bayer [EMAIL PROTECTED] writes:
On Jun 13, 2007, at 6:13 AM, David Bolen wrote:
* I want to remove the association between File Common and Job 1
but without affecting Job 2.
If I session.delete() the fc instance directly, SA purges the file
completely, including links
I was converting an older table definition from using an integer
primary key to a string (representation of UUID), and ran into a bit
of strange behavior, where my object instance's String primary key
receives an integer value (which appears to be the internal sqlite
rowid) after a flush. From
The Session object clearly isn't thread-safe, which is fine, but I was
curious if the intention is for that to also include its initial
allocation?
That is, I'd like to potentially allocate a new Session object in
thread A, but any and all operations on the object aside from the
instantiation
Matt Culbreth [EMAIL PROTECTED] writes:
I'm playing out with a few things now and I wanted to see if anyone
else has used SQLAlchemy in an asynchronous manner? For example, you
could create a service which responded to asynchronous requests for
data, and could be used by a web client,
22 matches
Mail list logo