Hi all,
I've got a requirement that seems like it should be fairly
straightforward, but my own attempts to work out the necessary code
have just become more and more contrived, and still don't work :( so
I'm hoping someone more familiar with SQLA's design can suggest a
better approach!
I suspect the answer to this is obvious, but it eludes me. I have
defined some SQlAlchemy table classes, using declarative_base, to
interact with some tables in an SQL Server database. I'm unsure that
the types I've chosen are correct.
I want to print the CREATE TABLE ddl, without executing it.
Hello,
There's a behaviour in SA that is not clear to me: if we look at the
example (User and Address) from the docs, we can change either the
related object or the foreign key
For example:
ad = Address(email_address='j...@google.com')
ad.user = jack
OR
ad.user_id = 1
What is the prefered
On Feb 25, 4:16 pm, Adam Pletcher adam.pletc...@gmail.com wrote:
Is it possible to connect to a server using Windows Authentication
using sqlalchemy?
Yes it is, the syntax is:
'mssql://hostname/database?trusted_connection=yes'
If you're connecting to a SQLEXPRESS instance, this becomes:
On Feb 25, 12:17 pm, Roger Demetrescu roger.demetre...@gmail.com
wrote:
Note that this implementation is very simple. Depending of your use
case, you probably should take a look at MutableType [1] and
types.TypeEngine.is_mutable().
[1]
see the recipe in
http://www.sqlalchemy.org/trac/wiki/FAQ#HowcanIgettheCREATETABLEDROPTABLEoutputasastring
.
On Feb 27, 2009, at 4:32 AM, Alex Willmer wrote:
I suspect the answer to this is obvious, but it eludes me. I have
defined some SQlAlchemy table classes, using declarative_base,
On Feb 27, 2009, at 3:10 PM, Ben Zealley wrote:
Hi all,
I've got a requirement that seems like it should be fairly
straightforward, but my own attempts to work out the necessary code
have just become more and more contrived, and still don't work :( so
I'm hoping someone more familiar
On Feb 27, 2009, at 3:51 PM, laurent wrote:
Hello,
There's a behaviour in SA that is not clear to me: if we look at the
example (User and Address) from the docs, we can change either the
related object or the foreign key
For example:
ad = Address(email_address='j...@google.com')
On Feb 27, 2009, at 11:24 PM, eLuke wrote:
I have a simple model/class named Comment with columns id (int),
comment (text), and postdate (datetime).
Below are the main bits of the python code I'm using to test how I
should handle this:
# json from the client's browser
json =
Hi Michael,
Thanks for the quick response!
I had no luck with has()/any() mostly because I didn't have the
attribute per se, just its (string) name - but I've rather belatedly
realised I can just use modelClass.__dict__[attr].any(), which works
like a charm.
I'll consider the functional
On Feb 28, 2009, at 12:26 PM, Ben Zealley wrote:
Hi Michael,
Thanks for the quick response!
I had no luck with has()/any() mostly because I didn't have the
attribute per se, just its (string) name - but I've rather belatedly
realised I can just use modelClass.__dict__[attr].any(), which
11 matches
Mail list logo