Jonathan Vanasco writes:
> On Thursday, January 5, 2017 at 8:34:52 PM UTC-5, Daniel Kraus wrote:
>>
>> The use-case is that I have a big model with lots of complex
>> relationships but 90% of the time I don't need the data from those.
>
> If I'm reading your question
Hi!
mike bayer writes:
> you're looking for session.merge() but if you're looking to save on a
> SELECT you might also want to send in load=False - and if you are
> starting with a fresh (non-pickled) object you probably need to call
> make_transient_to_detached first
you're looking for session.merge() but if you're looking to save on a
SELECT you might also want to send in load=False - and if you are
starting with a fresh (non-pickled) object you probably need to call
make_transient_to_detached first so that it acts like it was loaded from
the database
On Thursday, January 5, 2017 at 8:34:52 PM UTC-5, Daniel Kraus wrote:
>
> The use-case is that I have a big model with lots of complex
>
> relationships but 90% of the time I don't need the data from those.
>
If I'm reading your question correctly, most of what sqlalchemy does (and
excels at)
why dont you aggregate all those functions into just one function? they
are all on the same event after all. or have some kind of data
structure that has all those functions and you loop through a list to
register. lots of ways to make that be less code.
On 01/06/2017 10:43 AM, Darin
Is there a way to combine DDL events so to reduce the number of
event.listen(... ) statements that need to be created for a specific event
topic or is that a design mistake that has good reason for missing
implementation?
Take, for instance, the highlighted section of the following repo:
Does anyone know what the syntax for using DateRanges is?
I'm trying to find out if a given date falls within a range, and so thought
that the `in` syntax in Python might work (to no avail):
from psycopg2.extras import DateRange
session.query(Order).filter(Order.created_at in DateRange(d1, d2,