MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

Default database language check needs to be changed #539

Closed joshcalloway closed 1 year ago

joshcalloway commented 1 year ago

It would be nice if you changed the check you are performing here : mediconesystems/livewire-datatables/src/Http/Livewire/LivewireDatatable line 411 $sep_string = config('database.default') === 'pgsql' ? '"' : '`';

to compare against an editable setting in the config/laravel-datatables.php file instead of checking the default connection on the entire app. I rarely leave my database connections named that way and much more often have multiple connections to several types of databases so even if the name is correct that might not be the database i am querying. I would like the option to set it in that config so it stops adding that backtick to my pgsql data connections when they are not the default in the config/database.php.

It would actually be even better to be able to define the database language in the LivewireDatatable builder() or something so you could use this in the same app for multiple types of database connections.

joshcalloway commented 1 year ago

Never mind, this is in pr #441