Skip to content

SQLite run() returns undefined instead of Changes object #1791

@franklinfollis

Description

@franklinfollis

Issue description

Summary

Statement.run() and Database.run() currently return undefined, but should return a Changes object to match bun.

The docs are confusing as hell though - since their examples still say they return undefined (they don't)

// Example:

const result = db.run('INSERT INTO users (name) VALUES (?)', ['Alice']);
// => undefined
// Should be: { changes: 1, lastInsertRowid: 1 }

This'll help with showing some more valuable info for db studio.

Metadata

Metadata

Labels

sqliteFeatures or issues relating to SQLite support

Type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions