Haha thanks that worked!  I must of had tunnel vision when reading the
api docs.

Thank you for creating this extension, its proving to be very useful.

On May 10, 11:03 pm, alex bodnaru <[email protected]> wrote:
> On 05/10/2011 05:48 AM, JayFoolie wrote:
>
> > Hi,
>
> > I'm trying to create triggers on a sqlite database.
> > I can create triggers using a database management tool like
> > SQLiteStudio.  What I
> > want to do is implement the triggers in my python code.
>
> > I've tried using the "perform_ddl" method.  I can do simple inserts of
> > data using the perform_ddl mehtod, but when sqlalchemy creates the
> > tables it doesn't seem to create my trigger.   Here is whats my
> > statement looks like:
>
> > perform_ddl = ('after-create',
> >                    "CREATE TRIGGER
> > tgr_vendor_rma_item_UpdatePartStatusFailed AFTER INSERT ON
> > vendor_rma_item FOR EACH ROW BEGIN UPDATE Part SET status = 3 WHERE id
> > = ( SELECT part_id FROM vendor_rma_item WHERE part_id = NEW.part_id );
> > END;")
>
> > Am I missing something here?  Is there possibly a better way to create
> > triggers than using the entity's perform_ddl method?  Perhaps I need
> > to do this with sqlalchemy methods?
>
> cool you're using my extension ;) .
>
> remove the first '=' please.

-- 
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en.

Reply via email to