offix
offix copied to clipboard
SQLite does not support array types
While testing filtering with contains
operation, I discovered that array types are not saved to the db when using the websql adapter. After some digging, I realised that there is no support for an "Array" type so we can't save arrays naturally.
I think we have two options here,
- Don't allow array types when using websql
- Use some alternate method to save arrays, there are a couple of ways to this, see this
@wtrocki @kingsleyzissou
Split will work only for single dimensional arrays. I have been playing with SQL lite and I think that we do not need to create proper tables. Our data can be saved as one column
So our API can be:
await AsyncStorage.setItem( "mykey", "myValue")
However indexed fields will still need to be brought into columns for searchability.