-
Notifications
You must be signed in to change notification settings - Fork 9
sqlite: allow controlling number of reserved bytes #130
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,9 @@ type DB interface { | |
| // function's signature. | ||
| // | ||
| DisableFunction(name string, numArgs int) error | ||
| // FileControlInt is sqlite3_file_control for opcodes that take an | ||
| // integer argument. | ||
| FileControlInt(dbName string, op FileControlOp, arg *int) error | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, I am not quite following. It's a common argument for many functions here - do you think
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My bad, I hadn't noticed this pattern was already used elsewhere in the API. |
||
| } | ||
|
|
||
| // Stmt is an sqlite3_stmt* database connection object. | ||
|
|
@@ -351,6 +354,13 @@ func (o OpenFlags) String() string { | |
| return string(flags) | ||
| } | ||
|
|
||
| // FileControlOp is an opcode for sqlite3_file_control. | ||
| type FileControlOp int | ||
|
|
||
| const ( | ||
| SQLITE_FCNTL_RESERVE_BYTES FileControlOp = 38 | ||
| ) | ||
|
|
||
| // Checkpoint is a WAL checkpoint mode. | ||
| // It is used by sqlite3_wal_checkpoint_v2. | ||
| // | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As our higher-level interface to the underlying
sqlite3_file_controlmethod, maybe this method could also call theVACUUMfor us?