chore: ⬆️ updated deps

This commit is contained in:
2026-05-20 22:52:20 +02:00
parent d9f27c1775
commit 43f4680176
374 changed files with 295527 additions and 301467 deletions
+6
View File
@@ -12,6 +12,12 @@ package vtab
// The driver no longer auto-declares based on USING(...) args to support
// dynamic schemas (e.g., CSV headers).
//
// - Constraint support: Modules that want MATCH/other constraints must call
// Context.EnableConstraintSupport from within Create or Connect.
//
// - Vtab config: Modules can call Context.Config to pass sqlite3_vtab_config
// options (e.g., INNOCUOUS, DIRECTONLY) from within Create or Connect.
//
// - Constraint operators: ConstraintOp includes OpUnknown for operators that
// are not recognized. The driver maps common SQLite operators including EQ,
// NE, GT, GE, LT, LE, MATCH, IS/ISNOT, ISNULL/ISNOTNULL, LIKE, GLOB, REGEXP,
+34
View File
@@ -17,6 +17,10 @@ type Value = driver.Value
// may be added in the future as needed.
type Context struct {
declare func(string) error
// constraintSupport enables constraint support (e.g. MATCH) for the module.
constraintSupport func() error
// config issues sqlite3_vtab_config calls for other vtab options.
config func(op int32, args ...int32) error
}
// Declare must be called by a module from within Create or Connect to declare
@@ -32,10 +36,40 @@ func (c Context) Declare(schema string) error {
return c.declare(schema)
}
// EnableConstraintSupport enables virtual table constraint support in SQLite.
// This must be called from within Create or Connect.
func (c Context) EnableConstraintSupport() error {
if c.constraintSupport == nil {
return errors.New("vtab: constraint support not available in this context")
}
return c.constraintSupport()
}
// Config forwards sqlite3_vtab_config options to SQLite. This must be called
// from within Create or Connect.
func (c Context) Config(op int32, args ...int32) error {
if c.config == nil {
return errors.New("vtab: config not available in this context")
}
return c.config(op, args...)
}
// NewContext is used by the engine to create a Context bound to the current
// xCreate/xConnect call. External modules should not need to call this.
func NewContext(declare func(string) error) Context { return Context{declare: declare} }
// NewContextWithConstraintSupport is used by the engine to create a Context
// that can enable constraint support.
func NewContextWithConstraintSupport(declare func(string) error, constraintSupport func() error) Context {
return Context{declare: declare, constraintSupport: constraintSupport}
}
// NewContextWithConfig is used by the engine to create a Context that can
// enable constraint support and other sqlite3_vtab_config options.
func NewContextWithConfig(declare func(string) error, constraintSupport func() error, config func(op int32, args ...int32) error) Context {
return Context{declare: declare, constraintSupport: constraintSupport, config: config}
}
// Module represents a virtual table module, analogous to sqlite3_module in
// the SQLite C API. Implementations are responsible for creating and
// connecting table instances.