0

Is it possible to create a column that has value auto-generated (by a callback) when a select query is performed?

Imagine I have a database containing entries storing timestamp/actionid/user

I want to make a select query :

select timestamp, user, actionid, [actionname] 
          from mytable 
          where user LIKE 'xxxx' 
          order by [actionname]

With the value of [actionname] calculated on the fly (by a callback executed in my code) during the query execution.

I know it is possible to make other table and an inner join, but I was wondering if such a process exits.

3
  • I know you can define custom functions in C that can be invoked by SQLite (see SQLite docs); not sure if or how easy it is to marshal this to C#. Commented Oct 17, 2016 at 10:36
  • See Create/Use User-defined functions in System.Data.SQLite? Commented Oct 17, 2016 at 10:54
  • Thanks for both comments it helps a lot Commented Nov 2, 2016 at 15:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.