A TVF is just a "calling convention" for abbreviating a specific SELECT on a 
virtual table. It implies neither mutability of the returned values, nor 
persistence beyond the scope of the statement. Indeed the carray() example you 
give later is an eponymous ephemeral table, i.e. it does not require a CREATE 
VIRTUAL TABLE statement, but springs into existence by virtue of being 
mentioned (technically: it is created in the xFilter method) and "evaporates" 
when the cursor is closed.

If you want a mutable, persistent non-native table, then please document this 
fact by executing a CREATE VIRTUAL TABLE statement.

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Timothy Stack
Gesendet: Sonntag, 16. April 2017 23:57
An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: [sqlite] performing an UPDATE on a table-valued function

The current table-valued function feature seems to only work for SELECT 
statements.  Was any thought given to whether updates would be supported for 
table-valued functions?  It seems like it's technically possible and could be 
made to work right now with this awkward syntax:

  UPDATE foo SET col0 = 'bar' WHERE hidden_field = 'baz'

Having the real syntax, like the following, would be nice though:

  UPDATE foo('baz') SET col0 = 'bar'

thanks,

tim stack
_______________________________________________
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
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to