Documentation
¶
Overview ¶
Package executor provides SQL execution for xxldb
Package executor provides DML execution for xxldb
Index ¶
- Constants
- type Config
- type Engine
- func (e *Engine) ChangeEncryptionPassword(oldPassword, newPassword string) error
- func (e *Engine) Close() error
- func (e *Engine) Execute(sql string) (*Result, error)
- func (e *Engine) ExecuteStatement(stmt *parser.Statement) (*Result, error)
- func (e *Engine) ExecuteWithArgs(sql string, args ...interface{}) (*Result, error)
- func (e *Engine) ForceSave() error
- func (e *Engine) GetAuth() *auth.Auth
- func (e *Engine) GetBlobDirect(tableName string, columnName string, whereClause string) ([]byte, error)
- func (e *Engine) GetFTSIndexes() []string
- func (e *Engine) GetImageDirect(tableName string, columnName string, whereClause string) ([]byte, error)
- func (e *Engine) InsertBlobDirect(tableName string, columnName string, blobData interface{}) (uint64, error)
- func (e *Engine) InsertImageDirect(tableName string, columnName string, imageData interface{}) (uint64, error)
- func (e *Engine) InsertRowDirect(tableName string, values []interface{}) (uint64, error)
- func (e *Engine) IsEncrypted() bool
- func (e *Engine) ListTables() []string
- func (e *Engine) SetEncryption(password string) error
- func (e *Engine) SetSkipSave(skip bool)
- func (e *Engine) UpdateBlobDirect(tableName string, columnName string, blobData interface{}, whereClause string) (int64, error)
- func (e *Engine) UpdateImageDirect(tableName string, columnName string, imageData interface{}, whereClause string) (int64, error)
- type Result
- type Row
Constants ¶
const ( Version = "2.0.0" BuildDate = "2026-04-04" )
Version information
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Path string
InMemory bool
LogLevel string
Username string
Password string
AutoCommit bool
SyncInterval int
BlobThreshold int64 // Size threshold for external blob storage (default: 64KB, 0 = always inline)
EncryptPassword string // Password for database encryption
}
Config holds engine configuration
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the main database engine
func NewEngineWithConfig ¶
NewEngineWithConfig creates a new database engine with configuration
func NewEngineWithFS ¶
NewEngineWithFS creates a new database engine with custom filesystem
func (*Engine) ChangeEncryptionPassword ¶
ChangeEncryptionPassword changes the encryption password
func (*Engine) ExecuteStatement ¶
ExecuteStatement executes a parsed statement
func (*Engine) ExecuteWithArgs ¶
ExecuteWithArgs executes a SQL statement with arguments for parameterized queries This is useful for import operations that need to insert rows with values
func (*Engine) GetBlobDirect ¶
func (e *Engine) GetBlobDirect(tableName string, columnName string, whereClause string) ([]byte, error)
GetBlobDirect retrieves BLOB data directly from a table
func (*Engine) GetFTSIndexes ¶
GetFTSIndexes returns the list of FTS indexes (for debugging)
func (*Engine) GetImageDirect ¶
func (e *Engine) GetImageDirect(tableName string, columnName string, whereClause string) ([]byte, error)
GetImageDirect retrieves IMAGE data directly from a table
func (*Engine) InsertBlobDirect ¶
func (e *Engine) InsertBlobDirect(tableName string, columnName string, blobData interface{}) (uint64, error)
InsertBlobDirect inserts a row with BLOB data directly blobData can be []byte, io.Reader, or string (hex)
func (*Engine) InsertImageDirect ¶
func (e *Engine) InsertImageDirect(tableName string, columnName string, imageData interface{}) (uint64, error)
InsertImageDirect inserts a row with IMAGE data directly imageData can be []byte, io.Reader, or string (hex)
func (*Engine) InsertRowDirect ¶
InsertRowDirect inserts a row directly into a table This is more efficient for bulk imports as it bypasses SQL parsing
func (*Engine) IsEncrypted ¶
IsEncrypted returns whether the database is encrypted
func (*Engine) ListTables ¶
ListTables returns a list of all tables in the database
func (*Engine) SetEncryption ¶
SetEncryption enables encryption with the given password
func (*Engine) SetSkipSave ¶
SetSkipSave enables or disables skip-save mode for bulk imports