react-native-sqlite-storage icon indicating copy to clipboard operation
react-native-sqlite-storage copied to clipboard

Table Valued functions json_tree and json_each aren't supported.

Open deepakaggarwal7 opened this issue 2 years ago • 3 comments

Table Values functions json_tree and json_each aren't supported (for Android). It works for iOS.

Expected Behavior

Using json_each and json_tree are standard SQLite JSON1 Extensions. Without these function, json array values cannot be used for joins in queries which otherwise work flawlessly in Sqlite Query Editor.

Current Behavior

Using json_each results in no such table json_each Can the library be extended to support these table valued functions?

example query: SELECT * FROM Product WHERE TypeID IN (select Id from ShoppingCart, json_each( ShoppingCart.types, '$' )

Environment

React-Native:0.66 react-native-sqlite-storage:6.0.1 Emulator: Android Pixel 5

thanks

deepakaggarwal7 avatar Feb 16 '22 16:02 deepakaggarwal7

I realized I'm getting errors for JSON_Extract as well. My react-native.config.js contains following code as instructed to use the DB packed in this library but I still get the error using JSON extensions:

module.exports = {
    dependencies: {
      "react-native-sqlite-storage": {
        platforms: {
          android: {
            sourceDir:
              "../node_modules/react-native-sqlite-storage/platforms/android-native",
            packageImportPath: "import io.liteglue.SQLitePluginPackage;",
            packageInstance: "new SQLitePluginPackage()"
          }
        }
      }
    }
   

deepakaggarwal7 avatar Feb 20 '22 03:02 deepakaggarwal7

Any solution?

alexandreerick avatar Nov 01 '23 18:11 alexandreerick

I couldn't find one. I tepidly changed code to avoid json_extract at SQL side.

On Wed, Nov 1, 2023 at 11:44 PM Erick Alexandre @.***> wrote:

Any solution?

— Reply to this email directly, view it on GitHub https://github.com/andpor/react-native-sqlite-storage/issues/509#issuecomment-1789429009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEU7A3H3SBOQOWBKGTPUB2DYCKGP5AVCNFSM5OSD5WFKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZYHE2DEOJQGA4Q . You are receiving this because you authored the thread.Message ID: @.***>

deepakaggarwal7 avatar Nov 03 '23 08:11 deepakaggarwal7