drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Normalize last insert id in the statement result

Open
#1,919 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Describe what you want

I recently switched from D1 to LibSQL and for a short time I had D1 and LibSQL running at the same time in the application. My expectations was both are SQLite, the result will be the same. It was in most cases, but not for the last insert id.

LibSQL: `result.lastInsertRowid`
D1: `result.meta.last_row_id`

It would be nice to have something working across all sqlite versions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.