It is possible to bring an external resource into SQlite by writing user-defined functions and/or virtual tables. This would allow something like:
UPDATE <table> set (<rowlist>) = new_data(<arguments>) where needs_update(<arguments>); With the UDF returning 1 (TRUE) if the current row (identified by the arguments) needs an update and the row-valued function new_data() returns the new values. -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Torsten Curdt Gesendet: Montag, 28. Mai 2018 10:04 An: sqlite-users@mailinglists.sqlite.org Betreff: [EXTERNAL] Re: [sqlite] database locked on select I have to query an external resource for each row. Unfortunately nothing I can do in a single update query. Would mean keeping a lot of data manually in memory. On Mon, May 28, 2018 at 2:33 AM Abroży Nieprzełoży < abrozynieprzelozy314...@gmail.com> wrote: > BTW why not to update all rows by single update query? > > 2018-05-27 20:30 GMT+02:00, Torsten Curdt <tcu...@vafer.org>: > > I am doing a select, then iterate through the resultset and on each > > row call update on that row. > > I am using the golang driver and ran into the issue that on the > > update > the > > database is still locked from the select. > > > > https://github.com/mattn/go-sqlite3/issues/569 > > > > I have read http://www.sqlite.org/cvstrac/wiki?p=DatabaseIsLocked > > and > IIUC > > these types of updates should be possible since version 3.3.7 though > > - > and > > I am using 3.19.3. > > > > Any suggestion on how to track down why the updates fail? > > > > cheers, > > Torsten > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@mailinglists.sqlite.org > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users