nativescript-sqlite icon indicating copy to clipboard operation
nativescript-sqlite copied to clipboard

Support for sqlite3_create_function

Open mcordes opened this issue 8 years ago • 1 comments

Would it be possible to support custom functions in sqlite on iOS and Android. It would be desirable to be able to define custom functions and have them implemented by javascript functions.

This is definitely a wishlist item, I'm just curious if anyone would benefit from this (and even if it's technically feasible - I'm not familiar with the limitations of the sqlite implementations on mobile platforms).

  • http://www.sqlite.org/c3ref/create_function.html
  • Android helps out a little here - https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/database/sqlite/SQLiteCustomFunction.java#37

mcordes avatar Dec 20 '16 03:12 mcordes

This is possible to do by creating a custom native wrapper (like what Android did) in ObjC; however this is not a feature I will be adding myself as I honestly have no use for it, and this would require a bit of work. ;-)

I am willing to accept any pull requests; or you can hire me (or someone else) to add this feature.

NathanaelA avatar Mar 10 '17 18:03 NathanaelA