andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.75k stars 521 forks source link

Table Valued functions json_tree and json_each aren't supported. #509

Open deepakaggarwal7 opened 2 years ago

deepakaggarwal7 commented 2 years ago

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 commented 2 years ago

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()"
          }
        }
      }
    }
alexandreerick commented 10 months ago

Any solution?

deepakaggarwal7 commented 10 months ago

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: @.***>