Skip to content

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

Closed
@gtokman

Description

@gtokman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions