module

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2024 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

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
}

func (*CsvCursor) Close

func (t *CsvCursor) Close() error

func (*CsvCursor) Column

func (t *CsvCursor) Column(context *sqlite3.SQLiteContext, col int) error

func (*CsvCursor) EOF

func (t *CsvCursor) EOF() bool

func (*CsvCursor) Filter

func (t *CsvCursor) Filter(idxNum int, idxStr string, vals []interface{}) error

func (*CsvCursor) Next

func (t *CsvCursor) Next() error

func (*CsvCursor) Rowid

func (t *CsvCursor) Rowid() (int64, error)

type CsvModule

type CsvModule struct {
}

func (*CsvModule) Connect

func (m *CsvModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)

func (*CsvModule) Create

func (m *CsvModule) Create(c *sqlite3.SQLiteConn, args []string) (sqlite3.VTab, error)

func (*CsvModule) DestroyModule

func (v *CsvModule) DestroyModule()

type CsvTable

type CsvTable struct {
	// contains filtered or unexported fields
}

func (*CsvTable) BestIndex

func (t *CsvTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)

func (*CsvTable) Destroy

func (t *CsvTable) Destroy() error

func (*CsvTable) Disconnect

func (t *CsvTable) Disconnect() error

func (*CsvTable) Open

func (t *CsvTable) Open() (sqlite3.VTabCursor, error)

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) BestIndex

func (t *HtmlTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)

func (*HtmlTable) Destroy

func (t *HtmlTable) Destroy() error

func (*HtmlTable) Disconnect

func (t *HtmlTable) Disconnect() error

func (*HtmlTable) Open

func (t *HtmlTable) Open() (sqlite3.VTabCursor, error)

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) BestIndex

func (t *JSONTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)

func (*JSONTable) Destroy

func (t *JSONTable) Destroy() error

func (*JSONTable) Disconnect

func (t *JSONTable) Disconnect() error

func (*JSONTable) Open

func (t *JSONTable) Open() (sqlite3.VTabCursor, error)

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) Insert

func (t *SQLiteTable) Insert(id any, vals []any) (int64, error)

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

func (*SQLiteTable) Update

func (t *SQLiteTable) Update(id any, vals []any) error

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) BestIndex

func (t *TomlTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)

func (*TomlTable) Destroy

func (t *TomlTable) Destroy() error

func (*TomlTable) Disconnect

func (t *TomlTable) Disconnect() error

func (*TomlTable) Open

func (t *TomlTable) Open() (sqlite3.VTabCursor, error)

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()

type YamlTable

type YamlTable struct {
	// contains filtered or unexported fields
}

func (*YamlTable) BestIndex

func (t *YamlTable) BestIndex(cst []sqlite3.InfoConstraint, ob []sqlite3.InfoOrderBy) (*sqlite3.IndexResult, error)

func (*YamlTable) Destroy

func (t *YamlTable) Destroy() error

func (*YamlTable) Disconnect

func (t *YamlTable) Disconnect() error

func (*YamlTable) Open

func (t *YamlTable) Open() (sqlite3.VTabCursor, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL