I am getting stuck trying to upgrade to 0.8.x, as I can't get correlation
to work with nested subquery in column property. Here's a slightly absurd
example for illustration:
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Base =
Hello Michael
Sorry for the late reply.
So, below is my full stack trace:
Traceback (most recent call last):
File
/Users/foobar/Developpement/nursery_project/applications/nurserydb/utils_scripts/test2.py,
line 64, in module
plant.taxon = taxon_new # triggers an IntegrityError
File
Hello.
I have one more question about my approach to WindowedRangeQuery:
* Suppose a complex query q with join(...), filter(...) and options(...).
* I need to create q2 from q such that:
* It has no options.
* Can I reset the options with q = q.options(None)?
* It has select with the
Hello.
I've tried an experiment to verify that yield_per() with subqueryload() behaves
as badly as you described, but according to my practical observation, it issues
ONE subqueryload() and everything behaves as I would expect. It emits two
SELECTs, one to fetch the objects and the second one to
Hi,
I have two tables User and Following, and User has two relationships followings
and followers. It’s so typical, and next I want is readonly relationship to
union of followings and followers. I tried like:
friends = relationship(
'User',
collection_class=set,
It seems I found the most close solution:
http://stackoverflow.com/a/9119764/383405
I haven’t been aware that secondary can take select() query as well.
Might there be another way to achieve the same by any chance?
On Jun 5, 2013, at 9:27 PM, Hong Minhee min...@dahlia.kr wrote:
Hi,
I
Hello.
One more note. I've just tried the below experiment with joinedload() instead of
subqueryload() and that does NOT work just as you expected. One contact is
returned several times and the first occurrences have incomplete phones.
However my experiments with subqueryload() suggest that it
the Query emitted by subqueryload does not use yield_per. so if your total
result set is 1000 rows, and the total rows represented by all the collections
is 1, the first time that query is emitted, 1 rows will be fully
loaded and processed into memory at once. This would occur
On Jun 5, 2013, at 3:52 AM, Etienne Rouxel rouxel.etie...@gmail.com wrote:
However, I get confused by SQLAlchemy trying to set taxon_id to NULL or even
worse,
please keep in mind that this was within an autoflush, in between where the
state of your object graph in memory was complete. If
Ok, so yield_per() is useless when subqueryload() is used.
Thank you,
Ladislav Lenart
On 5.6.2013 16:27, Michael Bayer wrote:
the Query emitted by subqueryload does not use yield_per. so if your total
result set is 1000 rows, and the total rows represented by all the
collections is
On 06/04/2013 11:22 PM, Warwick Prince wrote:
On 06/04/2013 10:46 PM, Michael Bayer wrote:
There's a long standing ticket to add support for comments, at least at the DDL
level. I don't think anyone has looked into what level of support we get from
the various backends as far as
Am 04.06.2013, 04:57 Uhr, schrieb Rob Green robsgr...@gmail.com:
Hello,
I'm having some trouble getting my SQL query to work in SQLAlchemy.
In this example, I want to find out the number of meeting rooms and
bathrooms available to a user. The user is part of a userGroup, which is
assigned to
Was hunting around for how to do this, and couldn't find any examples, but
eventually figured it out.
Goal is to have all dates coming out of Postgres to be in UTC, regardless
of the DBA's timezone configuration.
Key piece of code is as follows:
import sqlalchemy
def
we do this (for PG and SQL Server):
class utcnow(expression.FunctionElement):
key = 'utcnow'
type = DateTime()
@compiles(utcnow, 'postgresql')
def _pg_utcnow(element, compiler, **kw):
return TIMEZONE('utc', CURRENT_TIMESTAMP)
@compiles(utcnow, 'mssql')
def _ms_utcnow(element,
Hello World!
This is my first foray into python and SQL Alchemy, and I'm spinning my
wheels. I'm running the code below and am able to connect to my DB and
query data without error.
import pyodbc
cnxn = pyodbc.connect('DSN=py_test; Trusted_Connection=Yes')
However, when I try
import
15 matches
Mail list logo