Documentation ¶
Index ¶
- type CsvCursor
- type CsvModule
- type CsvTable
- type HtmlCursor
- func (t *HtmlCursor) Close() error
- func (t *HtmlCursor) Column(context *sqlite3.SQLiteContext, col int) error
- func (t *HtmlCursor) EOF() bool
- func (t *HtmlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
- func (t *HtmlCursor) Next() error
- func (t *HtmlCursor) Rowid() (int64, error)
- type HtmlModule
- type HtmlTable
- type JSONCursor
- func (t *JSONCursor) Close() error
- func (t *JSONCursor) Column(context *sqlite3.SQLiteContext, col int) error
- func (t *JSONCursor) EOF() bool
- func (t *JSONCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
- func (t *JSONCursor) Next() error
- func (t *JSONCursor) Rowid() (int64, error)
- type JSONCursorColShape
- type JSONModule
- type JSONTable
- type JSONlCursor
- func (t *JSONlCursor) Close() error
- func (t *JSONlCursor) Column(context *sqlite3.SQLiteContext, col int) error
- func (t *JSONlCursor) EOF() bool
- func (t *JSONlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
- func (t *JSONlCursor) Next() error
- func (t *JSONlCursor) Rowid() (int64, error)
- type JSONlModule
- type JSONlTable
- type ParquetCursor
- func (t *ParquetCursor) Close() error
- func (t *ParquetCursor) Column(context *sqlite3.SQLiteContext, col int) error
- func (t *ParquetCursor) EOF() bool
- func (t *ParquetCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
- func (t *ParquetCursor) Next() error
- func (t *ParquetCursor) Rowid() (int64, error)
- type ParquetModule
- type ParquetTable
- type SQLiteCursor
- func (c *SQLiteCursor) Close() error
- func (c *SQLiteCursor) Column(context *sqlite3.SQLiteContext, col int) error
- func (c *SQLiteCursor) EOF() bool
- func (c *SQLiteCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
- func (c *SQLiteCursor) Next() error
- func (c *SQLiteCursor) Rowid() (int64, error)
- type SQLiteModule
- type SQLiteTable
- func (t *SQLiteTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)
- func (t *SQLiteTable) Delete(id any) error
- func (v *SQLiteTable) Destroy() error
- func (v *SQLiteTable) Disconnect() error
- func (t *SQLiteTable) Insert(id any, vals []any) (int64, error)
- func (t *SQLiteTable) Open() (sqlite3.VTabCursor, error)
- func (t *SQLiteTable) Update(id any, vals []any) error
- type TomlCursor
- func (t *TomlCursor) Close() error
- func (t *TomlCursor) Column(context *sqlite3.SQLiteContext, col int) error
- func (t *TomlCursor) EOF() bool
- func (t *TomlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
- func (t *TomlCursor) Next() error
- func (t *TomlCursor) Rowid() (int64, error)
- type TomlModule
- type TomlTable
- type YamlCursor
- func (t *YamlCursor) Close() error
- func (t *YamlCursor) Column(context *sqlite3.SQLiteContext, col int) error
- func (t *YamlCursor) EOF() bool
- func (t *YamlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
- func (t *YamlCursor) Next() error
- func (t *YamlCursor) Rowid() (int64, error)
- type YamlModule
- type YamlTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CsvCursor ¶
type CsvCursor struct {
// contains filtered or unexported fields
}
type CsvModule ¶
type CsvModule struct { }
func (*CsvModule) DestroyModule ¶
func (v *CsvModule) DestroyModule()
type CsvTable ¶
type CsvTable struct {
// contains filtered or unexported fields
}
func (*CsvTable) Disconnect ¶
type HtmlCursor ¶
type HtmlCursor struct {
// contains filtered or unexported fields
}
func (*HtmlCursor) Close ¶
func (t *HtmlCursor) Close() error
func (*HtmlCursor) Column ¶
func (t *HtmlCursor) Column(context *sqlite3.SQLiteContext, col int) error
func (*HtmlCursor) EOF ¶
func (t *HtmlCursor) EOF() bool
func (*HtmlCursor) Filter ¶
func (t *HtmlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
func (*HtmlCursor) Next ¶
func (t *HtmlCursor) Next() error
func (*HtmlCursor) Rowid ¶
func (t *HtmlCursor) Rowid() (int64, error)
type HtmlModule ¶
type HtmlModule struct { }
func (*HtmlModule) Connect ¶
func (m *HtmlModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*HtmlModule) Create ¶
func (m *HtmlModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*HtmlModule) DestroyModule ¶
func (v *HtmlModule) DestroyModule()
type HtmlTable ¶
type HtmlTable struct {
// contains filtered or unexported fields
}
func (*HtmlTable) Disconnect ¶
type JSONCursor ¶
type JSONCursor struct {
// contains filtered or unexported fields
}
func (*JSONCursor) Close ¶
func (t *JSONCursor) Close() error
func (*JSONCursor) Column ¶
func (t *JSONCursor) Column(context *sqlite3.SQLiteContext, col int) error
func (*JSONCursor) EOF ¶
func (t *JSONCursor) EOF() bool
func (*JSONCursor) Filter ¶
func (t *JSONCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
func (*JSONCursor) Next ¶
func (t *JSONCursor) Next() error
func (*JSONCursor) Rowid ¶
func (t *JSONCursor) Rowid() (int64, error)
type JSONCursorColShape ¶
type JSONCursorColShape struct { }
type JSONModule ¶
type JSONModule struct {
// contains filtered or unexported fields
}
func (*JSONModule) Connect ¶
func (m *JSONModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*JSONModule) Create ¶
func (m *JSONModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*JSONModule) DestroyModule ¶
func (v *JSONModule) DestroyModule()
type JSONTable ¶
type JSONTable struct {
// contains filtered or unexported fields
}
func (*JSONTable) Disconnect ¶
type JSONlCursor ¶
type JSONlCursor struct {
// contains filtered or unexported fields
}
func (*JSONlCursor) Close ¶
func (t *JSONlCursor) Close() error
func (*JSONlCursor) Column ¶
func (t *JSONlCursor) Column(context *sqlite3.SQLiteContext, col int) error
func (*JSONlCursor) EOF ¶
func (t *JSONlCursor) EOF() bool
func (*JSONlCursor) Filter ¶
func (t *JSONlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
func (*JSONlCursor) Next ¶
func (t *JSONlCursor) Next() error
func (*JSONlCursor) Rowid ¶
func (t *JSONlCursor) Rowid() (int64, error)
type JSONlModule ¶
type JSONlModule struct { }
func (*JSONlModule) Connect ¶
func (m *JSONlModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*JSONlModule) Create ¶
func (m *JSONlModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*JSONlModule) DestroyModule ¶
func (v *JSONlModule) DestroyModule()
type JSONlTable ¶
type JSONlTable struct {
// contains filtered or unexported fields
}
func (*JSONlTable) BestIndex ¶
func (t *JSONlTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)
func (*JSONlTable) Destroy ¶
func (t *JSONlTable) Destroy() error
func (*JSONlTable) Disconnect ¶
func (t *JSONlTable) Disconnect() error
func (*JSONlTable) Open ¶
func (t *JSONlTable) Open() (sqlite3.VTabCursor, error)
type ParquetCursor ¶
type ParquetCursor struct {
// contains filtered or unexported fields
}
func (*ParquetCursor) Close ¶
func (t *ParquetCursor) Close() error
func (*ParquetCursor) Column ¶
func (t *ParquetCursor) Column(context *sqlite3.SQLiteContext, col int) error
func (*ParquetCursor) EOF ¶
func (t *ParquetCursor) EOF() bool
func (*ParquetCursor) Filter ¶
func (t *ParquetCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
func (*ParquetCursor) Next ¶
func (t *ParquetCursor) Next() error
func (*ParquetCursor) Rowid ¶
func (t *ParquetCursor) Rowid() (int64, error)
type ParquetModule ¶
type ParquetModule struct { }
func (*ParquetModule) Connect ¶
func (m *ParquetModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*ParquetModule) Create ¶
func (m *ParquetModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*ParquetModule) DestroyModule ¶
func (v *ParquetModule) DestroyModule()
type ParquetTable ¶
type ParquetTable struct {
// contains filtered or unexported fields
}
func (*ParquetTable) BestIndex ¶
func (t *ParquetTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)
func (*ParquetTable) Destroy ¶
func (t *ParquetTable) Destroy() error
func (*ParquetTable) Disconnect ¶
func (t *ParquetTable) Disconnect() error
func (*ParquetTable) Open ¶
func (t *ParquetTable) Open() (sqlite3.VTabCursor, error)
type SQLiteCursor ¶
type SQLiteCursor struct {
// contains filtered or unexported fields
}
SQLiteCursor holds the information needed for the Column, Filter, EOF and Next methods
func (*SQLiteCursor) Close ¶
func (c *SQLiteCursor) Close() error
Close is called when the cursor is no longer needed
func (*SQLiteCursor) Column ¶
func (c *SQLiteCursor) Column(context *sqlite3.SQLiteContext, col int) error
Column is called when a column is queried
It should return the value of the column
func (*SQLiteCursor) EOF ¶
func (c *SQLiteCursor) EOF() bool
EOF is called after each row is queried to check if there are more rows
func (*SQLiteCursor) Filter ¶
func (c *SQLiteCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
func (*SQLiteCursor) Next ¶
func (c *SQLiteCursor) Next() error
Next is called to move the cursor to the next row
If noMoreRows is set to false, and the cursor is at the end of the rows, Next will ask the plugin for more rows
If noMoreRows is set to true, Next will set EOF to true
func (*SQLiteCursor) Rowid ¶
func (c *SQLiteCursor) Rowid() (int64, error)
RowID is called to get the row ID of the current row
type SQLiteModule ¶
type SQLiteModule struct { PluginPath string PluginArgs []string PluginManifest rpc.PluginManifest ConnectionIndex int TableIndex int UserConfig rpc.PluginConfig Logger hclog.Logger ConnectionPool *rpc.ConnectionPool Stderr io.Writer // contains filtered or unexported fields }
SQLiteModule is a struct that holds the information about the SQLite module
For each table that the plugin provides and for each profile, a new SQLiteModule should be created and registered in the main program
func (*SQLiteModule) Connect ¶
func (m *SQLiteModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
Connect is called when the virtual table is connected
Because it's an eponymous-only module, the method must be identical to Create
func (*SQLiteModule) Create ¶
func (m *SQLiteModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
Create is called when the virtual table is created e.g. CREATE VIRTUAL TABLE or SELECT...FROM(epo_table)
Its main job is to create a new RPC client and return the needed information for the SQLite virtual table methods
func (*SQLiteModule) DestroyModule ¶
func (v *SQLiteModule) DestroyModule()
func (*SQLiteModule) EponymousOnlyModule ¶
func (m *SQLiteModule) EponymousOnlyModule()
EponymousOnlyModule is a method that is used to mark the table as eponymous-only
See https://www.sqlite.org/vtab.html#eponymous_virtual_tables for more information
type SQLiteTable ¶
type SQLiteTable struct { PluginPath string ConnectionPool *rpc.ConnectionPool // contains filtered or unexported fields }
SQLiteTable that holds the information needed for the BestIndex and Open methods
func (*SQLiteTable) BestIndex ¶
func (t *SQLiteTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)
BestIndex is called when the virtual table is queried to figure out the best way to query the table
However, we don't use it that way but only to serialize the constraints for the Filter method
func (*SQLiteTable) Delete ¶
func (t *SQLiteTable) Delete(id any) error
func (*SQLiteTable) Destroy ¶
func (v *SQLiteTable) Destroy() error
func (*SQLiteTable) Disconnect ¶
func (v *SQLiteTable) Disconnect() error
These methods are not used in this plugin
func (*SQLiteTable) Open ¶
func (t *SQLiteTable) Open() (sqlite3.VTabCursor, error)
Open is called when a new cursor is opened
It should return a new cursor
type TomlCursor ¶
type TomlCursor struct {
// contains filtered or unexported fields
}
func (*TomlCursor) Close ¶
func (t *TomlCursor) Close() error
func (*TomlCursor) Column ¶
func (t *TomlCursor) Column(context *sqlite3.SQLiteContext, col int) error
func (*TomlCursor) EOF ¶
func (t *TomlCursor) EOF() bool
func (*TomlCursor) Filter ¶
func (t *TomlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
func (*TomlCursor) Next ¶
func (t *TomlCursor) Next() error
func (*TomlCursor) Rowid ¶
func (t *TomlCursor) Rowid() (int64, error)
type TomlModule ¶
type TomlModule struct { }
func (*TomlModule) Connect ¶
func (m *TomlModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*TomlModule) Create ¶
func (m *TomlModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*TomlModule) DestroyModule ¶
func (v *TomlModule) DestroyModule()
type TomlTable ¶
type TomlTable struct {
// contains filtered or unexported fields
}
func (*TomlTable) Disconnect ¶
type YamlCursor ¶
type YamlCursor struct {
// contains filtered or unexported fields
}
func (*YamlCursor) Close ¶
func (t *YamlCursor) Close() error
func (*YamlCursor) Column ¶
func (t *YamlCursor) Column(context *sqlite3.SQLiteContext, col int) error
func (*YamlCursor) EOF ¶
func (t *YamlCursor) EOF() bool
func (*YamlCursor) Filter ¶
func (t *YamlCursor) Filter(idxNum int, idxStr string, vals []interface{}) error
func (*YamlCursor) Next ¶
func (t *YamlCursor) Next() error
func (*YamlCursor) Rowid ¶
func (t *YamlCursor) Rowid() (int64, error)
type YamlModule ¶
type YamlModule struct { }
func (*YamlModule) Connect ¶
func (m *YamlModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*YamlModule) Create ¶
func (m *YamlModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)
func (*YamlModule) DestroyModule ¶
func (v *YamlModule) DestroyModule()