On Fri, Nov 6, 2015 at 6:50 PM, Nelson, Erik - 2 <
erik.l.nelson at bankofamerica.com> wrote:

> I have a user-defined function something like
>
> void quarter_sqlite3(sqlite3_context *context, int argc, sqlite3_value
> **argv);
>
> for each sqlite3_value being passed in, it would sometimes be helpful to
> have the associated field (if any) that the value is associated with.
>
> Is there any way to retrieve that?
>

An idea came to mind, but i'm not sure if it's usable for your case (it's
only potentially useful if the queries are static, not entered by end
users): UDFs are variadic, so you could pass an optional 2nd parameter with
any information as a string to the final parameter, e.g.:

  select quarter(t.a, 't.a'), quarter(4,'four') from t;

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

Reply via email to