Is there an easy way to determine wherever the database supports json? I am using the whereJsonCointains model method but as I read in the docs, only some database types support json operations. My current approach is to just add a try-block around the query and catch the exception but this seems a bit dirty to me.
I advise you to really rethink the use of a json column in your database. It will make most CRUD operations much harder and it will also make your system a bit slower since your really can't use indexes.
The whereJsonContains should only be used on json columns. You should never use it on a non-json column.
So you don't need any try catch if you do it properly.
@Tray2 Unfortunately I use a third party library which stores the data in json format either in a text or a json column. I changed whereJsonContains to the native where which uses the SQL JSON_EXTRACT() function which is sufficient for my use case to support SQLite databases.
@jlrdw Manually reading all the docs and comparing the current driver to a custom mapping table is not really an option as I would be laborious to maintain