On 4/16/17, Simon Slavin <slav...@bigfraud.org> wrote:
>
> On 16 Apr 2017, at 10:57pm, Timothy Stack <timothyshanest...@gmail.com>
> wrote:
>
>>  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'
>
> How would it know that 'baz' is a value for the column "hidden_field" rather
> than some other column ?

Table-valued functions are just virtual tables that allow parameters
to be used as constraints against the "hidden" columns of the virtual
table.  The parameters match in order.  The first parameter matches
against the first hidden column, and the second parameter matches
against the second hidden column, and so forth.

That is, I'm guessing, what the OP means.

Whether or not the suggest is a good idea is a different matter.  I'm
skeptical.  A function is typically not an l-value and is hence not
typically something that can be modified.

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

Reply via email to