1

I need to update a JSON type column in a MySQL database using JSON_ARRAY_APPEND. I can't just use python's .append() because this operation needs to occur on the database level to avoid race conditions.

Is this possible to do with SQLAlchemy?

1 Answer 1

1

Yes, you can use database builtin functions thanks to func:

from sqlalchemy import func

func.json_array_append(...)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.