clarification for this below; i have non-ORM updates happening inside ORM transaction (in after_insert() etc). How to make them use the parent transaction? i have a connection there.
> >> and, why atomic updates also have with commit after them? or is > >> this sqlite-specific? > > > > every CRUD operation requires a commit. DBAPI is always inside > > of a transaction. > > mmm i mean i have bunch of inserts and updates without a commit, > and then several atomic updates come with their own commits. and > then one more commit at the end. > e.g. > * SA: INFO BEGIN > * SA: INFO UPDATE "SequenceCounter" SET "curNum"=? WHERE > "SequenceCounter".db_id = ? > * SA: INFO [2, 8] > * SA: INFO INSERT INTO "Nalichnost" (kolvo_kym, cena, obj_id, > data_godnost, sklad_id, disabled, time_valid, kolvo_ot, stoka_id, > time_trans) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > * SA: INFO ['0', '978', None, None, 3, 0, None, '0', 1, None] > * SA: INFO INSERT INTO "Nalichnost" (kolvo_kym, cena, obj_id, > data_godnost, sklad_id, disabled, time_valid, kolvo_ot, stoka_id, > time_trans) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > * SA: INFO ['0', '94', None, None, 3, 0, None, '0', 1, None] > ... > * SA: INFO INSERT INTO "DocItem" (kolichestvo, data_godnost, > sk_ot_id, number, sk_kym_id, opisanie, cena, stoka_id, doc_id) > VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) > * SA: INFO ['702', None, None, 3, 5, None, '668', 1, 2] > * SA: INFO INSERT INTO "DocItem" (kolichestvo, data_godnost, > sk_ot_id, number, sk_kym_id, opisanie, cena, stoka_id, doc_id) > VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) > * SA: INFO ['422', None, None, 4, 6, None, '17', 1, 2] > > * SA: INFO UPDATE "Nalichnost" SET > kolvo_ot=(coalesce("Nalichnost".kolvo_ot, ?) + ?) WHERE > "Nalichnost".db_id = ? > * SA: INFO [0, 643, 4] > * SA: INFO COMMIT > * SA: INFO UPDATE "Nalichnost" SET > kolvo_kym=(coalesce("Nalichnost".kolvo_kym, ?) + ?) WHERE > "Nalichnost".db_id = ? > * SA: INFO [0, 643, None] > * SA: INFO COMMIT > * SA: INFO UPDATE "Nalichnost" SET > kolvo_ot=(coalesce("Nalichnost".kolvo_ot, ?) + ?) WHERE > "Nalichnost".db_id = ? > * SA: INFO [0, 702, 5] > * SA: INFO COMMIT > * SA: INFO UPDATE "Nalichnost" SET > kolvo_kym=(coalesce("Nalichnost".kolvo_kym, ?) + ?) WHERE > "Nalichnost".db_id = ? > * SA: INFO [0, 702, None] > * SA: INFO COMMIT > * SA: INFO UPDATE "Nalichnost" SET > kolvo_ot=(coalesce("Nalichnost".kolvo_ot, ?) + ?) WHERE > "Nalichnost".db_id = ? > * SA: INFO [0, 9, 3] > * SA: INFO COMMIT > * SA: INFO COMMIT > > > > --~--~---------~--~----~------------~-------~--~----~ 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 options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---