Documentation
¶
Index ¶
- Variables
- type MySQLBrowser
- func (b *MySQLBrowser) Connect(ctx context.Context, dsn string) error
- func (b *MySQLBrowser) Disconnect(ctx context.Context) error
- func (b *MySQLBrowser) List(ctx context.Context, ids []string) ([]plugin.BrowserItem, error)
- func (b *MySQLBrowser) ParseExplain(data plugin.BrowserQueryResult) (plugin.BrowserExplainResult, error)
- func (b *MySQLBrowser) Query(ctx context.Context, query string) (plugin.BrowserQueryResult, error)
- func (b *MySQLBrowser) Show(ctx context.Context, ids []string) (string, error)
- type MySQLDriver
- type MySQLDriverConnection
- func (c *MySQLDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *MySQLDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *MySQLDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
- func (c *MySQLDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
- func (c *MySQLDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *MySQLDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- func (c *MySQLDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- type MySQLQuery
- func (q *MySQLQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
- func (q *MySQLQuery) Commit(ctx context.Context) error
- func (q *MySQLQuery) Exec(ctx context.Context, query string, args ...any) error
- func (q *MySQLQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
- func (q *MySQLQuery) Rollback(ctx context.Context) error
- type NullDriver
- type NullDriverConnection
- func (c *NullDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *NullDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *NullDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
- func (c *NullDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
- func (c *NullDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *NullDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- func (c *NullDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- type NullDriverQuery
- func (q *NullDriverQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
- func (q *NullDriverQuery) Commit(ctx context.Context) error
- func (q *NullDriverQuery) Exec(ctx context.Context, query string, args ...any) error
- func (q *NullDriverQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
- func (q *NullDriverQuery) Rollback(ctx context.Context) error
- type PostgreSQLBrowser
- func (b *PostgreSQLBrowser) Connect(ctx context.Context, dsn string) error
- func (b *PostgreSQLBrowser) Disconnect(ctx context.Context) error
- func (b *PostgreSQLBrowser) List(ctx context.Context, ids []string) ([]plugin.BrowserItem, error)
- func (b *PostgreSQLBrowser) ParseExplain(data plugin.BrowserQueryResult) (plugin.BrowserExplainResult, error)
- func (b *PostgreSQLBrowser) Query(ctx context.Context, sql string) (plugin.BrowserQueryResult, error)
- func (b *PostgreSQLBrowser) Show(ctx context.Context, ids []string) (string, error)
- type PostgreSQLDriver
- type PostgreSQLDriverConnection
- func (c *PostgreSQLDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *PostgreSQLDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *PostgreSQLDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
- func (c *PostgreSQLDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
- func (c *PostgreSQLDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *PostgreSQLDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- func (c *PostgreSQLDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- type PostgreSQLQuery
- func (q *PostgreSQLQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
- func (q *PostgreSQLQuery) Commit(ctx context.Context) error
- func (q *PostgreSQLQuery) Exec(ctx context.Context, query string, args ...any) error
- func (q *PostgreSQLQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
- func (q *PostgreSQLQuery) Rollback(ctx context.Context) error
- type Registry
- type SQLiteBrowser
- func (b *SQLiteBrowser) Connect(ctx context.Context, dsn string) error
- func (b *SQLiteBrowser) Disconnect(ctx context.Context) error
- func (b *SQLiteBrowser) List(ctx context.Context, ids []string) ([]plugin.BrowserItem, error)
- func (b *SQLiteBrowser) ParseExplain(data plugin.BrowserQueryResult) (plugin.BrowserExplainResult, error)
- func (b *SQLiteBrowser) Query(ctx context.Context, query string) (plugin.BrowserQueryResult, error)
- func (b *SQLiteBrowser) Show(ctx context.Context, ids []string) (string, error)
- type SQLiteDriver
- func (d *SQLiteDriver) Connect(ctx context.Context, config config.DriverConfig) (plugin.DriverConnection, error)
- func (d *SQLiteDriver) CreateDatabase(ctx context.Context, path string) error
- func (d *SQLiteDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error
- func (d *SQLiteDriver) Initialize(ctx context.Context) error
- type SQLiteDriverConnection
- func (c *SQLiteDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *SQLiteDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *SQLiteDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
- func (c *SQLiteDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
- func (c *SQLiteDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, ...) error
- func (c *SQLiteDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- func (c *SQLiteDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
- type SQLiteDriverQuery
- func (q *SQLiteDriverQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
- func (q *SQLiteDriverQuery) Commit(ctx context.Context) error
- func (q *SQLiteDriverQuery) Exec(ctx context.Context, query string, args ...any) error
- func (q *SQLiteDriverQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
- func (q *SQLiteDriverQuery) Rollback(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDriverNotSelected = errors.New("driver not selected")
Functions ¶
This section is empty.
Types ¶
type MySQLBrowser ¶ added in v0.22.0
type MySQLBrowser struct {
// contains filtered or unexported fields
}
func NewMySQLBrowser ¶ added in v0.22.0
func NewMySQLBrowser(driver *MySQLDriver) *MySQLBrowser
func (*MySQLBrowser) Connect ¶ added in v0.22.0
func (b *MySQLBrowser) Connect(ctx context.Context, dsn string) error
func (*MySQLBrowser) Disconnect ¶ added in v0.22.0
func (b *MySQLBrowser) Disconnect(ctx context.Context) error
func (*MySQLBrowser) List ¶ added in v0.22.0
func (b *MySQLBrowser) List(ctx context.Context, ids []string) ([]plugin.BrowserItem, error)
List navigates the MySQL database hierarchy:
[] → databases [database] → object type categories [database, type] → objects of that type [database, "table", name] → table sub-categories [database, "table", name, category] → items in sub-category
func (*MySQLBrowser) ParseExplain ¶ added in v0.22.0
func (b *MySQLBrowser) ParseExplain(data plugin.BrowserQueryResult) (plugin.BrowserExplainResult, error)
func (*MySQLBrowser) Query ¶ added in v0.22.0
func (b *MySQLBrowser) Query(ctx context.Context, query string) (plugin.BrowserQueryResult, error)
type MySQLDriver ¶ added in v0.22.0
type MySQLDriver struct{}
func NewMySQLDriver ¶ added in v0.22.0
func NewMySQLDriver() *MySQLDriver
func (*MySQLDriver) Connect ¶ added in v0.22.0
func (d *MySQLDriver) Connect(ctx context.Context, config config.DriverConfig) (plugin.DriverConnection, error)
func (*MySQLDriver) Disconnect ¶ added in v0.22.0
func (d *MySQLDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error
type MySQLDriverConnection ¶ added in v0.22.0
func (*MySQLDriverConnection) AppendAuditLog ¶ added in v0.22.0
func (c *MySQLDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, log plugin.DriverAuditLog) error
func (*MySQLDriverConnection) LockAuditLog ¶ added in v0.22.0
func (c *MySQLDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*MySQLDriverConnection) Query ¶ added in v0.22.0
func (c *MySQLDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
func (*MySQLDriverConnection) ReadAuditLogs ¶ added in v0.22.0
func (c *MySQLDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
func (*MySQLDriverConnection) UnlockAuditLog ¶ added in v0.22.0
func (c *MySQLDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*MySQLDriverConnection) UpsertAuditLockTable ¶ added in v0.22.0
func (c *MySQLDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
func (*MySQLDriverConnection) UpsertAuditLogTable ¶ added in v0.22.0
func (c *MySQLDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
type MySQLQuery ¶ added in v0.22.0
type MySQLQuery struct {
// contains filtered or unexported fields
}
func (*MySQLQuery) Begin ¶ added in v0.22.0
func (q *MySQLQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
func (*MySQLQuery) Query ¶ added in v0.22.0
func (q *MySQLQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
type NullDriver ¶
func NewNullDriver ¶
func NewNullDriver() *NullDriver
func (*NullDriver) Connect ¶
func (d *NullDriver) Connect(ctx context.Context, config config.DriverConfig) (plugin.DriverConnection, error)
func (*NullDriver) Disconnect ¶
func (d *NullDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error
type NullDriverConnection ¶
type NullDriverConnection struct {
plugin.DriverConnection
}
func (*NullDriverConnection) AppendAuditLog ¶
func (c *NullDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, log plugin.DriverAuditLog) error
func (*NullDriverConnection) LockAuditLog ¶
func (c *NullDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*NullDriverConnection) Query ¶
func (c *NullDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
func (*NullDriverConnection) ReadAuditLogs ¶
func (c *NullDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
func (*NullDriverConnection) UnlockAuditLog ¶
func (c *NullDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*NullDriverConnection) UpsertAuditLockTable ¶
func (c *NullDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
func (*NullDriverConnection) UpsertAuditLogTable ¶
func (c *NullDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
type NullDriverQuery ¶
type NullDriverQuery struct{}
func (*NullDriverQuery) Begin ¶
func (q *NullDriverQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
func (*NullDriverQuery) Query ¶
func (q *NullDriverQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
type PostgreSQLBrowser ¶
type PostgreSQLBrowser struct {
// contains filtered or unexported fields
}
func NewPostgreSQLBrowser ¶
func NewPostgreSQLBrowser(driver *PostgreSQLDriver) *PostgreSQLBrowser
func (*PostgreSQLBrowser) Connect ¶
func (b *PostgreSQLBrowser) Connect(ctx context.Context, dsn string) error
func (*PostgreSQLBrowser) Disconnect ¶
func (b *PostgreSQLBrowser) Disconnect(ctx context.Context) error
func (*PostgreSQLBrowser) List ¶
func (b *PostgreSQLBrowser) List(ctx context.Context, ids []string) ([]plugin.BrowserItem, error)
func (*PostgreSQLBrowser) ParseExplain ¶
func (b *PostgreSQLBrowser) ParseExplain(data plugin.BrowserQueryResult) (plugin.BrowserExplainResult, error)
func (*PostgreSQLBrowser) Query ¶
func (b *PostgreSQLBrowser) Query(ctx context.Context, sql string) (plugin.BrowserQueryResult, error)
type PostgreSQLDriver ¶
type PostgreSQLDriver struct {
}
func NewPostgreSQLDriver ¶
func NewPostgreSQLDriver() *PostgreSQLDriver
func (*PostgreSQLDriver) Connect ¶
func (d *PostgreSQLDriver) Connect(ctx context.Context, config config.DriverConfig) (plugin.DriverConnection, error)
func (*PostgreSQLDriver) Disconnect ¶
func (d *PostgreSQLDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error
type PostgreSQLDriverConnection ¶
func (*PostgreSQLDriverConnection) AppendAuditLog ¶
func (c *PostgreSQLDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, log plugin.DriverAuditLog) error
func (*PostgreSQLDriverConnection) LockAuditLog ¶
func (c *PostgreSQLDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*PostgreSQLDriverConnection) Query ¶
func (c *PostgreSQLDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
func (*PostgreSQLDriverConnection) ReadAuditLogs ¶
func (c *PostgreSQLDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
func (*PostgreSQLDriverConnection) UnlockAuditLog ¶
func (c *PostgreSQLDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*PostgreSQLDriverConnection) UpsertAuditLockTable ¶
func (c *PostgreSQLDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
func (*PostgreSQLDriverConnection) UpsertAuditLogTable ¶
func (c *PostgreSQLDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
type PostgreSQLQuery ¶
type PostgreSQLQuery struct {
// contains filtered or unexported fields
}
func (*PostgreSQLQuery) Begin ¶
func (q *PostgreSQLQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
func (*PostgreSQLQuery) Query ¶
func (q *PostgreSQLQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) RegisterAll ¶
func (r *Registry) RegisterAll()
type SQLiteBrowser ¶ added in v0.22.0
type SQLiteBrowser struct {
// contains filtered or unexported fields
}
func NewSQLiteBrowser ¶ added in v0.22.0
func NewSQLiteBrowser(driver *SQLiteDriver) *SQLiteBrowser
func (*SQLiteBrowser) Connect ¶ added in v0.22.0
func (b *SQLiteBrowser) Connect(ctx context.Context, dsn string) error
func (*SQLiteBrowser) Disconnect ¶ added in v0.22.0
func (b *SQLiteBrowser) Disconnect(ctx context.Context) error
func (*SQLiteBrowser) List ¶ added in v0.22.0
func (b *SQLiteBrowser) List(ctx context.Context, ids []string) ([]plugin.BrowserItem, error)
List navigates a hierarchy with no schema level (SQLite is schema-free):
[] → object type categories (Tables, Views, Triggers) [type] → objects of that type [table, name] → sub-categories (Columns, Indexes, Foreign Keys, Triggers) [table, name, category] → items within that category
func (*SQLiteBrowser) ParseExplain ¶ added in v0.22.0
func (b *SQLiteBrowser) ParseExplain(data plugin.BrowserQueryResult) (plugin.BrowserExplainResult, error)
ParseExplain parses the output of SQLite EXPLAIN (VDBE bytecode).
SQLite EXPLAIN produces 8 columns: addr opcode p1 p2 p3 p4 p5 comment.
Result layout:
- Root: logical plan tree derived from opcode patterns (scans, filters, projections, global aggregation/sort/limit).
- SummaryLines: instruction count and key opcode tallies.
- Tables[0]: full VDBE bytecode listing with key opcodes highlighted.
- Tables[1]: cursor access summary (OpenRead / OpenWrite).
func (*SQLiteBrowser) Query ¶ added in v0.22.0
func (b *SQLiteBrowser) Query(ctx context.Context, query string) (plugin.BrowserQueryResult, error)
Query executes arbitrary SQL against the database using the read pool.
type SQLiteDriver ¶
type SQLiteDriver struct {
Path string
}
func NewSQLiteDriver ¶
func NewSQLiteDriver() *SQLiteDriver
func (*SQLiteDriver) Connect ¶
func (d *SQLiteDriver) Connect(ctx context.Context, config config.DriverConfig) (plugin.DriverConnection, error)
func (*SQLiteDriver) CreateDatabase ¶ added in v0.22.0
func (d *SQLiteDriver) CreateDatabase(ctx context.Context, path string) error
func (*SQLiteDriver) Disconnect ¶
func (d *SQLiteDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error
func (*SQLiteDriver) Initialize ¶ added in v0.22.0
func (d *SQLiteDriver) Initialize(ctx context.Context) error
TODO: add this to all drivers and call it once per app lifecycle
type SQLiteDriverConnection ¶
func (*SQLiteDriverConnection) AppendAuditLog ¶
func (c *SQLiteDriverConnection) AppendAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, log plugin.DriverAuditLog) error
func (*SQLiteDriverConnection) LockAuditLog ¶
func (c *SQLiteDriverConnection) LockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*SQLiteDriverConnection) Query ¶
func (c *SQLiteDriverConnection) Query(execCtx plugin.DriverExecutionContext) plugin.DriverQuery
func (*SQLiteDriverConnection) ReadAuditLogs ¶
func (c *SQLiteDriverConnection) ReadAuditLogs(ctx context.Context, execCtx plugin.DriverExecutionContext) ([]plugin.DriverAuditLog, error)
func (*SQLiteDriverConnection) UnlockAuditLog ¶
func (c *SQLiteDriverConnection) UnlockAuditLog(ctx context.Context, execCtx plugin.DriverExecutionContext, lock plugin.DriverAuditLock) error
func (*SQLiteDriverConnection) UpsertAuditLockTable ¶
func (c *SQLiteDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
func (*SQLiteDriverConnection) UpsertAuditLogTable ¶
func (c *SQLiteDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error
type SQLiteDriverQuery ¶
type SQLiteDriverQuery struct {
// contains filtered or unexported fields
}
func (*SQLiteDriverQuery) Begin ¶
func (q *SQLiteDriverQuery) Begin(ctx context.Context) (plugin.DriverQuery, error)
func (*SQLiteDriverQuery) Query ¶
func (q *SQLiteDriverQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.