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

Drizzle: $returningId() returns an empty arrray after an insert. #4195

Open
gtokman opened this issue Dec 26, 2024 · 0 comments
Open

Drizzle: $returningId() returns an empty arrray after an insert. #4195

gtokman opened this issue Dec 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gtokman
Copy link

gtokman commented Dec 26, 2024

What version of Effect is running?

3.12.0

What steps can reproduce the bug?

Using the dizzle returningId function should return the id as documented here. Instead I am receiving an empty array.

      const db = yield* MySqlDrizzle.MysqlDrizzle;
      const result = yield* db
        .insert(usersTable)
        .values({
          email,
          username,
        })
        .$returningId()

What is the expected behavior?

In the example above I should receive the id back in an array; In pg you can receive the inserted object back after an insert.

What do you see instead?

Empty array.

Additional information

No response

@gtokman gtokman added the bug Something isn't working label Dec 26, 2024
@gtokman gtokman changed the title Drizzle $returningId() returns an empty arrray after an insert. Drizzle: $returningId() returns an empty arrray after an insert. Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant