On 8 Oct 2014, at 5:14am, Stephen Chrzanowski <pontia...@gmail.com> wrote:
> The one downside I just realized is that ON CONFLICT can be used outside of > the table declarations as well, so perhaps a different word or signal might > be needed for it to make linguistic sense, or, this version of ON CONFLICT > USE DEFAULT can only be used in the tables field def'n. > > Thoughts? You could probably use a TRIGGER that detects the type of row you don't want and replaces it with your preferred form. This doesn't do exactly what you want, but it is something like it. I did have one system which created reports on certain operations and put them in a TABLE called 'log'. I could use TRIGGERs in that program to have it notice data I didn't like, report on it, then delete the offending row. All the program had to do was look in TABLE log for anything new tagged 'conflict' and report it back to the user. It was a pretty neat toy but it turned out more complicated than I really needed. SQL doesn't detail any method of communicating with the user (or even the programmer). From its origins as a simple demonstration of a concept it has grown so powerful that people try to do programming in it without using a proper programming language. It may be that a new procedural data manipulation language will come along one day but I think it will allow the programmer to define data conflict in a more elegant manner. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users