I've extended the OCaml SQLite3 bindings to have custom aggregate  
function support, but have run into a slight snag.

The custom functions are registered against the database handle, but  
when prepared statements are garbage collected (and hence call  
sqlite3_finalize() on the statement handle), the custom functions  
appear to disappear also.  Any subsequent use of that function in  
other prepared statements result in a MISUSE error.

I can get things to work by ensuring that no prepared statements get  
garbage collected by holding a reference to them open.  Is this the  
intended behaviour of sqlite3_finalize() when run against statements,  
or is something else wonky in my bindings?

The source to the bindings are up at http://github.com/avsm/ocaml-sqlite3-agg/ 
  with a testcase in tests/test_agg.ml

-anil

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

Reply via email to