I'm using the ORM and one of my tables does not have a primary key defined.
I am also using DeferredReflection, and I can't seem to figure out how to
defer the PrimaryKeyConstraint until Base.prepare() runs. Any pointers?
Base = declarative_base(cls=DeferredReflection)
class
and 0.9.
On Feb 27, 2014, at 7:29 PM, Michael Bayer
mik...@zzzcomputing.comjavascript:
wrote:
On Feb 27, 2014, at 4:38 PM, Rob Crowell rob.c...@moat.com javascript:
wrote:
# in_ clause with 1 STRING, 1 BINARY
filter_cols = tuple_(HashTest.hash_val, HashTest.hash_type
When I pass binary data to a multi-column in_ clause, I seem to be geting
inconsistent results and I need some help! I did some testing with MySQL,
Postgres, and Vertica (connecting via
https://pypi.python.org/pypi/vertica-sqlalchemy/0.1). It appears MySQL
works correctly but both Postgres
I am having a bit of trouble getting DeferredReflection working the way I
want; not sure if I am overlooking something obvious or if I just don't
really understand how it's supposed to work.
I'm trying to define my models before creating my engine (this does not
work):
Base =
Interesting, thanks Michael. I didn't realize autoload was implied when
using DeferredReflection but that makes sense.
Thanks!
On Monday, February 17, 2014 7:17:34 PM UTC-5, Michael Bayer wrote:
On Feb 17, 2014, at 6:23 PM, Rob Crowell robcc...@gmail.com javascript:
wrote:
I am having
or contains_eager or any of that
yet.
On Feb 27, 2013, at 2:07 AM, Rob Crowell robcc...@gmail.com javascript:
wrote:
Example code: https://gist.github.com/rcrowell/5045832
I have Person and Town tables, which are joined in a many-to-many fashion
through a VisitedDestinations table. I
, VisitedDestinations.town).\
options(contains_eager(Person.visited_destinations,
VisitedDestinations.town)).\
filter(Town.name.in_(['Atlanta', 'Memphis']))
On Feb 27, 2013, at 1:48 PM, Rob Crowell rob.c...@moat.com javascript:
wrote:
Sure! Here's the query I am attempting to replicate:
SELECT
, at 2:40 PM, Rob Crowell rob.c...@moat.com javascript:
wrote:
Ah okay, so you do recommend the contains_eager approach. I guess this is
exactly the use-case it is designed for? I always get a little scared when
I try using advanced features of SQLAlchemy :)
One last question. The query here
I'm building a pyramid application using pyramid_tm and
ZopeTransactionExtension. We've written a little subscriber on NewResponse
that writes out some values to a log file about the current user
(request.user.id) after each request. For anybody that knows pyramid
pretty well, we set the
Thanks Michael,
Writing a big list of conditions and combining them with and_(*conditions)
worked well. I was indeed querying like this before:
for condition in conditions:
q = q.filter(condition)
print q
On Friday, January 18, 2013 6:00:04 PM UTC-5, Michael Bayer wrote:
On Jan 18,
I haven't boiled this down to a short test case yet, but when my WHERE
clause gets especially long I start getting the recursion depth exceeded
exception. Is this a well-known limitation of sqlalchemy? We're running
this query in production currently without SQLAlchemy, and it performs
fine,
...@zzzcomputing.com wrote:
On Nov 16, 2012, at 2:59 PM, Rob Crowell wrote:
Thanks for the help so far Michael! I can explain a little more about
what I'm trying to do (I'm using a fictional application here but I
think it pretty accurately translates into my actual application).
BACKGROUND
On Nov 15, 10:48 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Nov 15, 2012, at 7:33 PM, Rob Crowell wrote:
Sorry, that got cut off at the end.
class IssueTag(Base):
__tablename__ = 'issue_user_tag'
sqlalchemy.exc.InvalidRequestError: Table 'issue_user_tag
13 matches
Mail list logo