eloquent-viewable icon indicating copy to clipboard operation
eloquent-viewable copied to clipboard

feat: add recordMany function

Open mauri870 opened this issue 2 years ago • 2 comments

mauri870 avatar Jun 09 '22 08:06 mauri870

What would be a use case for this?

cyrildewit avatar Jun 11 '22 08:06 cyrildewit

@cyrildewit One use case is when migrating from a different solution to yours, for example from a integer column views count to the eloquent-viewable package. We need to seed the views count we already have and using views($viewable)->record() does an insert per view so it's extremely slow, where as recordMany insert multiple rows with a single insert query.

mauri870 avatar Jun 11 '22 14:06 mauri870