@svilen
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For
e.g. order_by = [desc(table1.mycol)]
Disrupt07 napsal(a):
In my table I have a column with type Boolean. When using order_by on
this column I am getting the results as follows:
False
False
True
True
True
...
True
I want them the other way round (the True first, then the False).
@ml
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more
Hi,
I'm trying to create a relation like this
Testing [1] - [many] Target (where target.is_testtgt==0)
i.e. I want to map only to Target rows that match the where condition.
Now, this is easy enough using assign_mapper:
assign_mapper(ctx, Testing, testing, properties={ 'targets':
Is there a simple example of how to connect to a SQL Server instance
using SQLAlchemy and the adodbapi module?
Searching in this group didn't seem to find any concrete examples of
the connection string I need to connect to an ODBC datasource.
vic
Ach my sqlserver instance seems to just take a long time and I'm
too impatient.
create_engine('mssql://localhost/some_db_name') takes 10 seconds for
some reason, but it does work.
weird.
vic
On Apr 16, 11:09 am, Victor Ng [EMAIL PROTECTED] wrote:
Is there a simple example of how to
Hello,
Paul Johnston a écrit :
Hi,
I'm trying to create a relation like this
Testing [1] - [many] Target (where target.is_testtgt==0)
i.e. I want to map only to Target rows that match the where condition.
Now, this is easy enough using assign_mapper:
assign_mapper(ctx, Testing,
On Apr 16, 2007, at 5:55 AM, ml wrote:
Hi!
Let's have:
-
users_table = Table(users, metadata,
Column(id, Integer, primary_key=True),
Column(user_name, String(16))
)
addresses_table = Table(addresses, metadata,
Column(id, Integer, primary_key=True),
How can I select user's addresses when I know only his id? And I don't
want to select the user first.
session.query(Address).join(user).select(User.c.id==the user id)
I was afraid of that :-) I hoped it can go in a cleaner way like
join(Address.c.user) but giving the property as a
Hi,
Have you tried :
Testing.mapper.add_property('target', relation(Target, primary))
(of course after having defined the Testing and Target classes...)
Works a treat!
Thank-you, it's great to have this working :-)
Paul
--~--~-~--~~~---~--~~
You
I'm getting some pretty strange behavior when connecting to SQL
Server.
My code is pretty straight forward, just create an engine, create
metadata, introspect on a table...
from sqlalchemy import *
db = create_engine('mssql://./msdb')
meta = BoundMetaData(db)
tbl = Table('sysdtssteplog', meta,
Oops - fingers are faster than my brain. Here's the snippet from the
second attempt at creating a Table using autoload, and it succeeds.
---
In [10]: tbl = Table('sysdtssteplog', meta, autoload=True)
In [11]: [c.name for c in tbl.columns]
Out[11]:
['stepexecutionid',
'lineagefull',
It sounds like its getting to be time to make pyodbc the preferred DBAPI
interface for MSSQL. I'll start a new thread to see if there's any
objections.
On 4/16/07, Victor Ng [EMAIL PROTECTED] wrote:
Sweet! This seems to work well now.
Is there a way I can update the documentation for the
Unless there's any objections, I think it's time to make pyodbc the
preferred access method for MSSQL.
Currently the MSSQL module checks for DBAPI interfaces in this order if one
isn't specified explicitly:
adodbapi
pymssql
pyodbc
I'd like to change it to the exact opposite:
pyodbc
Is it possible to create indexes using a function using sqlalchemy and
postgresql?
Something like: create index idx on table (lower(table.field))
Thanks,
Steve
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
I wondered if it was possible to manage users inside postgres with the
help of SQLAlchemy. But I guess Postgres users are special objects and
not just rows in a table. I tried to do this, but it did not work.
from sqlalchemy import *
metadata = BoundMetaData('postgres://127.0.0.1/template1')
Thanks Michael, both the 2 approaches did the trick... :)
On 4/16/07, Michael Bayer [EMAIL PROTECTED] wrote:
with firebird, the appropriate database closed exceptions need to
be added to its dialect's is_disconnect() method...someone needs to
submit a patch for that (you can create one
not sure what kind of key error youre getting back, but the issue
probably relates either to the lack of a schema argument or
improper permissions on one or both tables.
On Apr 16, 2007, at 5:24 PM, Koen Bok wrote:
I wondered if it was possible to manage users inside postgres with the
18 matches
Mail list logo