Open GoogleCodeExporter opened 9 years ago
Original comment by sergey.s...@gmail.com
on 25 Nov 2013 at 8:41
It seems that trigger do not work at all. Creating a much simpler trigger works:
private static final String TRG_DATA_DEL = "CREATE TRIGGER \"trgDataDel\"" +
" AFTER DELETE ON \"tblData\" BEGIN" +
" UPDATE \"tblStat\"" +
" SET value=5;" +
" END;";
This means, that it does not run into the bug described above. However, the
trigger is never "executed" when deleting from tblData. Should be a separate
issue I guess. But I'm running out of time right now. sry
Original comment by matze.gs...@cable.vol.at
on 26 Nov 2013 at 12:15
Yes, triggers don't work in SQLJet - they are supported in DB schema just for
compability with native SQLite. So far SQLJet doesn't support SQL at all in
run-time - only for database schema definition. It means that if you want use
SQLJet then you should handle all data logic in code through API. So when you
delete data in table then you also should update data in other table - you
should write this code in Java. Yes, of course, it is limitation of SQLJet.
Maybe in future it will be resolved in next major version of SQLJet.
But there definitely is issue with parsing SQL for triggers, which you found.
Original comment by sergey.s...@gmail.com
on 26 Nov 2013 at 2:07
Original issue reported on code.google.com by
matze.gs...@cable.vol.at
on 25 Nov 2013 at 3:10Attachments: