I've never developed for a platform with a small memory footprint (Unless
you talk about the Vic20 as being the smallest footprint I've used, but not
relevant to SQLite, and my skill was writing text based paint program),
but, throwing results like this into memory could cause more issues for
devices that have KILOBYTES worth of memory to play with as a whole, versus
a machine with Gigabytes of extra-never-been-used-in-its-lifespan memory.

If maybe there were some kind of interface that the library could expose so
that if a constraint error occurs, something external to SQLite can deal
with it, regardless of what the results are.  If the developer wants to
know what the constraint faults are, they just map their own routines to
whatever interface SQLite could provide and the SQLite engine can just feed
whatever it can.  The owness of whatever that output is belongs to the
developer, not to the SQLite dev team, and reservations on what the output
of this new routine is apt to change at any time.  If the events triggered
by the constraint failures are invalid at the start, but then become valid
later on, it'd be again up to the developer to determine what happened, not
the SQLite dev team.

My two cents.


On Mon, Apr 4, 2016 at 1:49 PM, Domingo Alvarez Duarte <
sqlite-mail at dev.dadbiz.es> wrote:

> Thank you for reply !
>
> Good point, but for sure there is great minds here that can come with a
> solution to this problem !
>
> Sqlite could use a table in memory (or a hash table) and add delete from it
> as it found violations/resolve then and at then end it has all the
> violations
> to show, it can be done lazy so if no violations occur no hash table is
> ever
> created.
>
>
> The actual situation is better than nothing but it's still frustrating !
>
> Cheers !
> >  Mon Apr 04 2016 07:39:19 PM CEST from "Clemens Ladisch"
> ><clemens at ladisch.de>  Subject: Re: [sqlite] FOREIGN KEY constraint failed
> >
> >  Domingo Alvarez Duarte wrote:
> >
> >>But even then could it have let's say a place for record the last foreign
> >>key
> >> violation ?
> >>
>
> >  This would not help if that last constraint is no longer violated at the
> > end of the transaction.
> >
> >
> > Regards,
> > Clemens
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users at mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> >
>
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to