storage

package
v0.0.0-...-a7bc12e Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSQLiteTableNotFound = errors.New("sqlite table not found")

Functions

This section is empty.

Types

type SQLiteTableDetail

type SQLiteTableDetail struct {
	Name        string           `json:"name"`
	Type        string           `json:"type"`
	Columns     []string         `json:"columns"`
	PrimaryKeys []string         `json:"primaryKeys"`
	Rows        []map[string]any `json:"rows"`
	RowCount    int64            `json:"rowCount"`
	Page        int              `json:"page"`
	PerPage     int              `json:"perPage"`
}

type SQLiteTableProvider

type SQLiteTableProvider interface {
	ListSQLiteTables() ([]SQLiteTableSummary, error)
	GetSQLiteTable(name string, page int, perPage int) (SQLiteTableDetail, error)
}

type SQLiteTableSummary

type SQLiteTableSummary struct {
	Name         string   `json:"name"`
	Type         string   `json:"type"`
	RowCount     int64    `json:"rowCount"`
	ColumnCount  int      `json:"columnCount"`
	PrimaryKeys  []string `json:"primaryKeys"`
	PrimaryCount int      `json:"primaryCount"`
}

type SqliteTableProvider

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

func NewSQLiteTableProvider

func NewSQLiteTableProvider(ctx nmq.Context, log *zap.Logger) *SqliteTableProvider

func (*SqliteTableProvider) GetSQLiteTable

func (p *SqliteTableProvider) GetSQLiteTable(name string, page int, perPage int) (SQLiteTableDetail, error)

func (*SqliteTableProvider) ListSQLiteTables

func (p *SqliteTableProvider) ListSQLiteTables() ([]SQLiteTableSummary, error)

Jump to

Keyboard shortcuts

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