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

Ensure PreparedQuery has replacer context #296

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Ensure PreparedQuery has replacer context #296

merged 1 commit into from
Jul 3, 2024

Conversation

kearfy
Copy link
Member

@kearfy kearfy commented Jul 3, 2024

Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.

What is the motivation?

In an oversight, PreparedQuery used just a bare minimal CBOR encoder, leaving custom tags such as record ids not properly encoded.

What does this change do?

Alters the partiallyEncodeObject method to accept all encode options, allowing the PreparedQuery class to pass a replacer to the CBOR encode method.

What is your testing strategy?

Added a test to ensure that prepared queries have replacer context.

Is this related to any issues?

No

Have you read the Contributing Guidelines?

@kearfy kearfy merged commit 6f40503 into surrealdb:main Jul 3, 2024
8 checks passed
@kearfy kearfy deleted the micha/fix-prepared-query-replacer-context branch July 3, 2024 09:51
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

Successfully merging this pull request may close these issues.

1 participant