[sqlalchemy] result of fetchone() in 0.9.1

2014-01-30 Thread jack2318
Hi, I experience very strange behaviour in version 0.9.1 (no problem in version 0.8.4) - I can't image that it is problem in SQLAlchemy but I don't see why I am getting error running this code: tbl_session = Table('SESSION', metadata, autoload=True) stmt =

[sqlalchemy] Stored Procedures - MySQL - commit

2009-02-19 Thread jack2318
Hi, I am running following test: conn = engine.connect() conn.execute(text(CALL SP_SA_TEST(4))) conn.close() engine echo: 2009-02-19 12:17:29,069 INFO sqlalchemy.engine.base.Engine.0x...8310 CALL SP_SA_TEST(4) 2009-02-19 12:17:29,069 INFO sqlalchemy.engine.base.Engine.0x...8310 []

[sqlalchemy] Re: Stored Procedures - MySQL - commit

2009-02-19 Thread jack2318
. On Feb 19, 2009, at 3:28 PM, jack2318 wrote: Hi, I am running following test:   conn = engine.connect()   conn.execute(text(CALL SP_SA_TEST(4)))   conn.close() engine echo: 2009-02-19 12:17:29,069 INFO sqlalchemy.engine.base.Engine.0x...8310 CALL SP_SA_TEST(4) 2009-02-19 12:17

[sqlalchemy] Re: outerjoin in mapper

2008-10-30 Thread jack2318
:43 PM, jack2318 wrote: Hi, I have 3 tables - tbl_item, tbl_item_sku, and tbl_item_lot Table tbl_item has 2 FKs my mapper is pretty simple: mdbItem = mapper(dbItem, tbl_item,                 properties={                             'sku': relation(dbItemSKU

[sqlalchemy] Re: outerjoin in mapper

2008-10-30 Thread jack2318
statement generated is: SELECT items.id, items.item_lot_id, items.item_sku_id FROM item_sku, items LEFT OUTER JOIN item_lot ON item_lot.id =   items.item_lot_id WHERE items.item_sku_id = item_sku.id On Oct 30, 2008, at 12:19 PM, jack2318 wrote: I tried quite a few combinations

[sqlalchemy] outerjoin in mapper

2008-10-29 Thread jack2318
Hi, I have 3 tables - tbl_item, tbl_item_sku, and tbl_item_lot Table tbl_item has 2 FKs my mapper is pretty simple: mdbItem = mapper(dbItem, tbl_item, properties={ 'sku': relation(dbItemSKU,

[sqlalchemy] Deleted rowcount x does not match number of objects deleted y

2008-10-24 Thread jack2318
Hi, I guess I am doing something wrong but looking on 'raw' SQL it looks fine. My code: session = Session() order = session.query(dbOutOrder).get(2) for line in order.lines: session.delete(line) session.flush() #session.commit() for i in

[sqlalchemy] Deleted rowcount x does not match number of objects deleted y [PART 2]

2008-10-24 Thread jack2318
I am really sorry but I pressed POST before I was ready. So again the code (without comments) session = Session() order = session.query(dbOutOrder).get(2) for line in order.lines: session.delete(line) session.flush() for i in range(1,10):

[sqlalchemy] text

2008-06-11 Thread jack2318
I tried very simple test: s = text(SELECT COUNT(*) FROM table WHERE field LIKE 'something') count = conn.execute(s).fetchone() and this produced error Unexpected error: type 'exceptions.TypeError' not enough arguments for format string not big deal there is few way around but just for

[sqlalchemy] Re: text

2008-06-11 Thread jack2318
Of jack2318 Sent: 11 June 2008 17:50 To: sqlalchemy Subject: [sqlalchemy] text I tried very simple test: s = text(SELECT COUNT(*) FROM table WHERE field LIKE 'something') count = conn.execute(s).fetchone() and this produced error Unexpected error: type 'exceptions.TypeError