Ciao,

  I  am a  True  Beginner with  SQLite and  I  am writing  a
binding to  it for  a programming language.   While wrapping
the functions accepting "sqlite3_value"  arguments, I am not
sure if I understand  from where "sqlite3_bind_value()" (and
"sqlite3_result_value()") should take their arguments.

  Is it  actually possible and  safe to execute  a statement
from the implementation of  an app-defined SQL function?  So
SQL function arguments can be bound to statement parameters,
and results from a statement can be used as return values of
app-defined SQL functions?

  Can I think of instances of "sqlite3_value" as shared data
structures whose  life is  correctly handled by  SQLite with
some mechanism like reference counting?

  If the answers are "yes":

* Is there some simple and "known" example of such mechanism
  I can put  in my test suite and documentation  to show how
  it is done?

* If the  nested statement execution fails  for some reason:
  is  there some  convention about  how the  app-defined SQL
  function should signal the error to its caller?

  If the  answers are  "no": are  "sqlite3_bind_value()" and
"sqlite3_result_value()"   there  only   for  SQL   function
implementations embedded  in the source code  of SQLite?  So
is it better if I do not expose them at the foreign language
level?

HTH
-- 
Marco Maggi
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to