You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A month ago our team had the problem of slow tests when using MySQL directly in the tests so we decided to use SQLite in the tests to improve the performance.
This change improved the performance, but there was one case where the tests crashed because of the difference in column concatenation between MySQL and SQLite. Where MySQL uses CONCAT and SQLite uses || for concatenation.
Discussion
I was wondering if it would be a good idea to add whereConcat to internally detect the database driver and prepare the proper sql for both cases.
I'm ready to make a pr for this new feature but I thought it was necessary to know if there were more people who thought this would be necessary.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Background
With laravel 11 the performance of the tests has been improved by using :memory: SQLite database and it is a great benefit.
https://laravel.com/docs/11.x/releases#database-performance
A month ago our team had the problem of slow tests when using MySQL directly in the tests so we decided to use SQLite in the tests to improve the performance.
This change improved the performance, but there was one case where the tests crashed because of the difference in column concatenation between MySQL and SQLite. Where MySQL uses
CONCAT
and SQLite uses||
for concatenation.Discussion
I was wondering if it would be a good idea to add
whereConcat
to internally detect the database driver and prepare the proper sql for both cases.I'm ready to make a pr for this new feature but I thought it was necessary to know if there were more people who thought this would be necessary.
Similar discussions
#32886
Beta Was this translation helpful? Give feedback.
All reactions