With the next version of SQLite (which will be released this week) you
will be able to write a trigger on deletion of dependent rows where
you will just call your function.

Pavel

On Tue, Oct 13, 2009 at 1:19 PM, Igor Tandetnik <itandet...@mvps.org> wrote:
> mwnn <mwnn...@gmail.com> wrote:
>> i am using triggers to delete dependent rows of a table when a
>> referred row is deleted. Is there a way for me to let SQLite call a
>> user-defined function for every row deleted in a trigger?
>
> Well, you could write your trigger like this:
>
> create trigger ... on delete ...
> begin
>    select mycustomfunction(id) from mytable where condition;
>    delete from mytable where condition;
> end;
>
> Igor Tandetnik
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to