Closed mivinci closed 2 months ago
Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.
The current HTTP client has no method merge to partially update record(s) by performing a query like
merge
UPDATE person:tobbie MERGE { settings: { active: true } };
So I solved it according to the official documentation from https://surrealdb.com/docs/integration/http#modify-one.
Adding the merge method to class SurrealHTTP.
SurrealHTTP
db = SurrealHTTP(...) await db.merge('person:tobbie', { 'settings': { 'active': True } })
which should and did output the modified record.
https://github.com/surrealdb/surrealdb.py/issues/79
Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.
What is the motivation?
The current HTTP client has no method
merge
to partially update record(s) by performing a query likeSo I solved it according to the official documentation from https://surrealdb.com/docs/integration/http#modify-one.
Type of Change
What does this change do?
Adding the
merge
method to classSurrealHTTP
.What is your testing strategy?
which should and did output the modified record.
Is this related to any issues?
https://github.com/surrealdb/surrealdb.py/issues/79
Have you read the Contributing Guidelines?