Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-19 Thread Richard Hipp
On 4/19/17, Timothy Stack wrote: > > ​Richard, if I made the necessary changes to the parser, docs, and updated > the carray extension as an example, would you accept the patch? > Probably not. But an actual demonstration showing that your proposed enhancement is useful and does not impact perfo

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-19 Thread Timothy Stack
On Sun, Apr 16, 2017 at 3:40 PM, Richard Hipp wrote: > > On 16 Apr 2017, at 10:57pm, Timothy Stack > > 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'

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-18 Thread Timothy Stack
On Tue, Apr 18, 2017 at 12:04 AM, Hick Gunter wrote: > 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 la

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-18 Thread Hick Gunter
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 requir

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-16 Thread Timothy Stack
On Sun, Apr 16, 2017 at 3:40 PM, Richard Hipp wrote: > On 4/16/17, Simon Slavin wrote: > > > > On 16 Apr 2017, at 10:57pm, Timothy Stack > > wrote: > > > >> UPDATE foo SET col0 = 'bar' WHERE hidden_field = 'baz' > >> > >> Having the real syntax, like the following, would be nice though: > >> >

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-16 Thread Richard Hipp
On 4/16/17, Simon Slavin wrote: > > On 16 Apr 2017, at 10:57pm, Timothy Stack > 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

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-16 Thread Simon Slavin
On 16 Apr 2017, at 10:57pm, Timothy Stack 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