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

Feature: Allow upsert multiple Records #399

Open
2 tasks done
Aymankht opened this issue Mar 4, 2025 · 2 comments
Open
2 tasks done

Feature: Allow upsert multiple Records #399

Aymankht opened this issue Mar 4, 2025 · 2 comments

Comments

@Aymankht
Copy link

Aymankht commented Mar 4, 2025

Is your feature request related to a problem?

Upsert only allows single Record to be upserted. Insert allows multiple Records to be upserted, which is consistend wih SurrealQl. Upsert should also allow this to be consistend with SurrealQl and the insert method.

Describe the solution

If there was any comments or documentation on how the encoder/decoder works, I would try it myself. But after two hours, I still cant figure out how the upsert method is translated into a fetchable query. I would be very delighted to make some pull-requests, but at the current state I dont see the motivation to spend hours just trying to understand how it works.

Alternative methods

Maybe the type declaration is just faulty, and the method works. Maybe typescript just pushes the error, but since in the docs no descritption is made if it accepts multiple records, the docs and the type-declaration should be fixed.

SurrealDB version

2.2.1 for macos on aarch64

JavaScript SDK version

1.2.1

Contact Details

[email protected]

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nickchomey
Copy link

nickchomey commented Mar 4, 2025

This is an issue for the core db, not the SDKs

Such an issue, and associated PR, was already created a while ago

surrealdb/surrealdb#4431

@Aymankht
Copy link
Author

Aymankht commented Mar 4, 2025

I will look into it

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