ORM-07: Add raw SQL helpers to Database #7
Labels
No labels
area:core
area:database
area:migrations
area:model
area:relations
area:schema
area:tests
breaking-change
size:M
size:S
tracking
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
NoctisWolfshadow/tessera-orm#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Depends on: #6
Context
Databaseshould also let you send instructions to the database directly (DDL, ad-hoc statements, test setup) without reaching for rusqlite.Tasks
Database::execute(sql, params) -> Result<usize>, where params areimpl rusqlite::Params.Database::execute_batch(sql) -> Result<()>.Database::last_insert_rowid() -> Result<i64>.Example
Acceptance criteria
execute_batchruns several statements in one call.Error::Sqlite.Database::last_insert_rowid() makes no sense it can just be called in the transaction itself and then returned there