[sqlalchemy] Re: Print Query (literal_binds)

2014-10-28 Thread Lycovian
Thanks for the reply, still the same issue, instead of printing the literal value of the bind I get's a parametrized query but the bind values are not inline as expected after passing the compile_kwargs={'literal_binds': True} to compile(). Here is what I get when I use the print_query from

Re: [sqlalchemy] Print Query (literal_binds)

2014-10-28 Thread Michael Bayer
On Oct 28, 2014, at 12:12 PM, Lycovian mfwil...@gmail.com wrote: I guess this leaves me with my original question, what does literal_binds get you when comiled_kwargs is filled? Per the documentation I would expect it to at minimum merge in the parameter values into the string inline.

Re: [sqlalchemy] Status of column comment support (mainly interested in MySQL)

2014-10-28 Thread Michael Bayer
if you want to make a simple pull request that just adds a keyword argument “comments” to Column and Table (including some basic tests, probably in test/sql/test_compiler.py for now), we can add that in. The more elaborate stuff with __doc__ and declarative, I definitely don’t think __doc__

[sqlalchemy] creating engine in python, No module named 'MySQLdb'

2014-10-28 Thread Larry Green
Simple question. Configuration= Anaconda3 Python 3.4 and many various 3rd party modules. sqlalchemy 0.9.4 verified installed Windows 7 x64 machine. The first part of the sqlalchemy tutorial states do the following in python: *import sqlalchemy* works perfectly, then: *from sqlalchemy import

Re: [sqlalchemy] Print Query (literal_binds)

2014-10-28 Thread Jonathan Vanasco
I didn't realize this was an Insert. This doesn't work in 0.9 or in master... Base = declarative_base() class Foo(Base): __tablename__ = 'foo' id = Column(Integer, primary_key=True) aaa = Column(Integer, ) bbb = Column(Integer, ) q =

Re: [sqlalchemy] creating engine in python, No module named 'MySQLdb'

2014-10-28 Thread Simon King
On Tue, Oct 28, 2014 at 5:23 PM, Larry Green lgr...@smartmarketdata.com wrote: Simple question. Configuration= Anaconda3 Python 3.4 and many various 3rd party modules. sqlalchemy 0.9.4 verified installed Windows 7 x64 machine. The first part of the sqlalchemy tutorial states do the

RE: [sqlalchemy] creating engine in python, No module named 'MySQLdb'

2014-10-28 Thread Larry Green
Following http://docs.sqlalchemy.org/en/rel_0_9/orm/tutorial.html Maybe this is a question for Anaconda then, as they include the modules in their package. Maybe I need to install mysqldb? Not installed in Anaconda? I might just skip Anaconda and build it all myself... -Original

Re: [sqlalchemy] Eager Loading of AssociationProxy (Generic Association with Discriminator on Association)

2014-10-28 Thread Victor Reichert
Thank you for your response, and double thank you for Sqlalchemy! I was misunderstanding the second query. I now see that the eager load is working properly. Thanks! So I know the limitations of my approach, it is possible to eager load the address.parent? I've tried: eager_addresses =

[sqlalchemy] Not identifying all unique constraints in sqlite

2014-10-28 Thread Jon Nelson
In sqlite you can define a unique constraint without a name (and without CONSTRAINT): CREATE TABLE foo (a int, b int, UNIQUE (a,b)); The SQLAlchemy get_unique_constraints doesn't pick that up, due to the regex looking for CONSTRAINT some name UNIQUE (columns here). What's a reasonable