mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
Prepare 3.51.0.
This commit is contained in:
8
const.go
8
const.go
@@ -73,6 +73,9 @@ const (
|
|||||||
ERROR_MISSING_COLLSEQ ExtendedErrorCode = xErrorCode(ERROR) | (1 << 8)
|
ERROR_MISSING_COLLSEQ ExtendedErrorCode = xErrorCode(ERROR) | (1 << 8)
|
||||||
ERROR_RETRY ExtendedErrorCode = xErrorCode(ERROR) | (2 << 8)
|
ERROR_RETRY ExtendedErrorCode = xErrorCode(ERROR) | (2 << 8)
|
||||||
ERROR_SNAPSHOT ExtendedErrorCode = xErrorCode(ERROR) | (3 << 8)
|
ERROR_SNAPSHOT ExtendedErrorCode = xErrorCode(ERROR) | (3 << 8)
|
||||||
|
ERROR_RESERVESIZE ExtendedErrorCode = xErrorCode(ERROR) | (4 << 8)
|
||||||
|
ERROR_KEY ExtendedErrorCode = xErrorCode(ERROR) | (5 << 8)
|
||||||
|
ERROR_UNABLE ExtendedErrorCode = xErrorCode(ERROR) | (6 << 8)
|
||||||
IOERR_READ ExtendedErrorCode = xErrorCode(IOERR) | (1 << 8)
|
IOERR_READ ExtendedErrorCode = xErrorCode(IOERR) | (1 << 8)
|
||||||
IOERR_SHORT_READ ExtendedErrorCode = xErrorCode(IOERR) | (2 << 8)
|
IOERR_SHORT_READ ExtendedErrorCode = xErrorCode(IOERR) | (2 << 8)
|
||||||
IOERR_WRITE ExtendedErrorCode = xErrorCode(IOERR) | (3 << 8)
|
IOERR_WRITE ExtendedErrorCode = xErrorCode(IOERR) | (3 << 8)
|
||||||
@@ -107,6 +110,8 @@ const (
|
|||||||
IOERR_DATA ExtendedErrorCode = xErrorCode(IOERR) | (32 << 8)
|
IOERR_DATA ExtendedErrorCode = xErrorCode(IOERR) | (32 << 8)
|
||||||
IOERR_CORRUPTFS ExtendedErrorCode = xErrorCode(IOERR) | (33 << 8)
|
IOERR_CORRUPTFS ExtendedErrorCode = xErrorCode(IOERR) | (33 << 8)
|
||||||
IOERR_IN_PAGE ExtendedErrorCode = xErrorCode(IOERR) | (34 << 8)
|
IOERR_IN_PAGE ExtendedErrorCode = xErrorCode(IOERR) | (34 << 8)
|
||||||
|
IOERR_BADKEY ExtendedErrorCode = xErrorCode(IOERR) | (35 << 8)
|
||||||
|
IOERR_CODEC ExtendedErrorCode = xErrorCode(IOERR) | (36 << 8)
|
||||||
LOCKED_SHAREDCACHE ExtendedErrorCode = xErrorCode(LOCKED) | (1 << 8)
|
LOCKED_SHAREDCACHE ExtendedErrorCode = xErrorCode(LOCKED) | (1 << 8)
|
||||||
LOCKED_VTAB ExtendedErrorCode = xErrorCode(LOCKED) | (2 << 8)
|
LOCKED_VTAB ExtendedErrorCode = xErrorCode(LOCKED) | (2 << 8)
|
||||||
BUSY_RECOVERY ExtendedErrorCode = xErrorCode(BUSY) | (1 << 8)
|
BUSY_RECOVERY ExtendedErrorCode = xErrorCode(BUSY) | (1 << 8)
|
||||||
@@ -362,9 +367,10 @@ const (
|
|||||||
// CheckpointMode are all the checkpoint mode values.
|
// CheckpointMode are all the checkpoint mode values.
|
||||||
//
|
//
|
||||||
// https://sqlite.org/c3ref/c_checkpoint_full.html
|
// https://sqlite.org/c3ref/c_checkpoint_full.html
|
||||||
type CheckpointMode uint32
|
type CheckpointMode int32
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
CHECKPOINT_NOOP CheckpointMode = -1 /* Do no work at all */
|
||||||
CHECKPOINT_PASSIVE CheckpointMode = 0 /* Do as much as possible w/o blocking */
|
CHECKPOINT_PASSIVE CheckpointMode = 0 /* Do as much as possible w/o blocking */
|
||||||
CHECKPOINT_FULL CheckpointMode = 1 /* Wait for writers, then checkpoint */
|
CHECKPOINT_FULL CheckpointMode = 1 /* Wait for writers, then checkpoint */
|
||||||
CHECKPOINT_RESTART CheckpointMode = 2 /* Like FULL but wait for readers */
|
CHECKPOINT_RESTART CheckpointMode = 2 /* Like FULL but wait for readers */
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ func (c *cursor) Next() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *cursor) RowID() (int64, error) {
|
func (c *cursor) RowID() (int64, error) {
|
||||||
return int64(c.rowID), nil
|
// One-based RowID for consistency with carray and other tables.
|
||||||
|
return int64(c.rowID) + 1, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cursor) Column(ctx sqlite3.Context, n int) error {
|
func (c *cursor) Column(ctx sqlite3.Context, n int) error {
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ func (c *closure) BestIndex(idx *sqlite3.IndexInfo) error {
|
|||||||
return sqlite3.CONSTRAINT
|
return sqlite3.CONSTRAINT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idx.IdxFlags = sqlite3.INDEX_SCAN_HEX
|
||||||
idx.EstimatedCost = cost
|
idx.EstimatedCost = cost
|
||||||
idx.IdxNum = plan
|
idx.IdxNum = plan
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ const (
|
|||||||
ERROR_MISSING_COLLSEQ = ERROR | (1 << 8)
|
ERROR_MISSING_COLLSEQ = ERROR | (1 << 8)
|
||||||
ERROR_RETRY = ERROR | (2 << 8)
|
ERROR_RETRY = ERROR | (2 << 8)
|
||||||
ERROR_SNAPSHOT = ERROR | (3 << 8)
|
ERROR_SNAPSHOT = ERROR | (3 << 8)
|
||||||
|
ERROR_RESERVESIZE = ERROR | (4 << 8)
|
||||||
|
ERROR_KEY = ERROR | (5 << 8)
|
||||||
|
ERROR_UNABLE = ERROR | (6 << 8)
|
||||||
IOERR_READ = IOERR | (1 << 8)
|
IOERR_READ = IOERR | (1 << 8)
|
||||||
IOERR_SHORT_READ = IOERR | (2 << 8)
|
IOERR_SHORT_READ = IOERR | (2 << 8)
|
||||||
IOERR_WRITE = IOERR | (3 << 8)
|
IOERR_WRITE = IOERR | (3 << 8)
|
||||||
@@ -73,6 +76,8 @@ const (
|
|||||||
IOERR_DATA = IOERR | (32 << 8)
|
IOERR_DATA = IOERR | (32 << 8)
|
||||||
IOERR_CORRUPTFS = IOERR | (33 << 8)
|
IOERR_CORRUPTFS = IOERR | (33 << 8)
|
||||||
IOERR_IN_PAGE = IOERR | (34 << 8)
|
IOERR_IN_PAGE = IOERR | (34 << 8)
|
||||||
|
IOERR_BADKEY = IOERR | (35 << 8)
|
||||||
|
IOERR_CODEC = IOERR | (36 << 8)
|
||||||
LOCKED_SHAREDCACHE = LOCKED | (1 << 8)
|
LOCKED_SHAREDCACHE = LOCKED | (1 << 8)
|
||||||
LOCKED_VTAB = LOCKED | (2 << 8)
|
LOCKED_VTAB = LOCKED | (2 << 8)
|
||||||
BUSY_RECOVERY = BUSY | (1 << 8)
|
BUSY_RECOVERY = BUSY | (1 << 8)
|
||||||
|
|||||||
3
vtab.go
3
vtab.go
@@ -445,7 +445,8 @@ const (
|
|||||||
type IndexScanFlag uint32
|
type IndexScanFlag uint32
|
||||||
|
|
||||||
const (
|
const (
|
||||||
INDEX_SCAN_UNIQUE IndexScanFlag = 1
|
INDEX_SCAN_UNIQUE IndexScanFlag = 0x00000001
|
||||||
|
INDEX_SCAN_HEX IndexScanFlag = 0x00000002
|
||||||
)
|
)
|
||||||
|
|
||||||
func vtabModuleCallback(i vtabConstructor) func(_ context.Context, _ api.Module, _ ptr_t, _ int32, _, _, _ ptr_t) res_t {
|
func vtabModuleCallback(i vtabConstructor) func(_ context.Context, _ api.Module, _ ptr_t, _ int32, _, _, _ ptr_t) res_t {
|
||||||
|
|||||||
Reference in New Issue
Block a user