Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update a json column #111

Open
tengkusyafiq opened this issue Aug 28, 2024 · 1 comment
Open

How to update a json column #111

tengkusyafiq opened this issue Aug 28, 2024 · 1 comment

Comments

@tengkusyafiq
Copy link

Hi, thanks for the awesome library!

I tried to batch()->update() multiple rows with a json column with value of a list of integers like so: [1, 2, 3]

However, it is messing with the increment/decrement logic.

First value in Increment/Decrement array needs to be a string and a math operator (+, -, *, /, %)

Is it possible to update a json column? If yes, can you give us an example?

Thank you 🥇

@github-staff github-staff deleted a comment Aug 28, 2024
@aneesdev
Copy link

@tengkusyafiq you need to json encode the json column first instead of array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants