ascii-encoded string:
url = 'mysql://login:[EMAIL PROTECTED]/adverts?charset=cp1251'
engine = sqlalchemy.create_engine(url, convert_unicode=True, pool_recycle=4)
metadata = sqlalchemy.BoundMetaData(engine)
ad_table = sqlalchemy.Table('adverts', metadata, autoload=True)
unicode string:
Hello,
I have a problem with order_by on a many-to-many relationship (using
assign_mapper):
--
attachment_table = Table('attachments', meta,
Column('id', Integer, primary_key=True),
Column('file', Binary, nullable=False),
Column('name', Unicode(40),
Thanks Michael. it works as you've described.
Huy
put the order_by in your status relation.
On Mar 26, 2007, at 12:23 PM, HD Mail wrote:
I think the issue is you cant put a task_status ordering in your
Task mapper since that table is not part of its mapping.
I'm trying to create a subselect that has a where condition using an
identically named column as the outer select. I'm not able to figure
out how to tell SQLAlchemy that I need two parameters--one for each
query. Here is what my SQL would look like if I wrote it by hand:
SELECT signals.*
Hi!
I want meta.create_all() to generate and print the SQL only and don't
query the DB. Is there any way?
Thanks for advices.
David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to
use 'sites':relation(Site, backref=backref('attachments',
order_by=attachment_table.c.name)) for now.
On Mar 30, 5:50 am, Alexandre CONRAD [EMAIL PROTECTED] wrote:
Hello,
I have a problem with order_by on a many-to-many relationship (using
assign_mapper):
--
On Mar 30, 10:54 am, Paul Kippes [EMAIL PROTECTED]
wrote:
I'm trying to create a subselect that has a where condition using an
identically named column as the outer select. I'm not able to figure
out how to tell SQLAlchemy that I need two parameters--one for each
query. Here is what my SQL
fix in changeset 2475
On Mar 30, 5:19 am, Andrew Stromnov [EMAIL PROTECTED] wrote:
ascii-encoded string:
url = 'mysql://login:[EMAIL PROTECTED]/adverts?charset=cp1251'
engine = sqlalchemy.create_engine(url, convert_unicode=True,
pool_recycle=4)
metadata =
On 3/26/07, Michael Bayer [EMAIL PROTECTED] wrote:
(and whether that be a .query() or Query() or SelectResults not big
difference imo.)
i vote Query().
I tried to implement it but I couldn't do it the way I wanted to. The
problem is: how do I construct a clause from a clause with bind
this approach should work for now, but will need some small
modifications in the next release of SA (i.e. it should be easier):
from sqlalchemy import *
class FakeDBAPI(object):
def __init__(self):
self.paramstyle = 'named'
e = create_engine('oracle://', module=FakeDBAPI()) #
the treenodes table has no explicit sorting field, so by default it
will sort by either the row ID of the table or the primary key field.
the only operation that can be issued to the database when you add an
item to the list is INSERT, so this will always assemble new nodes as
the last element in
Fetched resultproxy objects have dictionary semantics, and most things that
expect dictionaries will work fine with them.
Make sure you've fetched all your results (via .fetchall()) before handing
them off for processing.
Rick
On 3/30/07, vinjvinj [EMAIL PROTECTED] wrote:
I'm putting the rows
12 matches
Mail list logo