sqlite

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSource

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

DataSource wraps a SQLite DataSource.

func New

func New(dsn string) (*DataSource, error)

New initializes a new SQLite Datasource.

func (*DataSource) DescribeTable

func (d *DataSource) DescribeTable(_, table string) ([][]*string, error)

DescribeTable describes table.

func (*DataSource) ListSchemas

func (d *DataSource) ListSchemas() ([]string, error)

ListSchemas returns available schemas.

func (*DataSource) ListTables

func (d *DataSource) ListTables(_ string) ([]string, error)

ListTables lists available tables in the database.

func (*DataSource) Ping

func (d *DataSource) Ping() error

Ping checks if database is accessible.

func (*DataSource) PreviewTable

func (d *DataSource) PreviewTable(_, table string) ([][]*string, error)

PreviewTable returns first 10 row from given table.

func (*DataSource) Query

func (d *DataSource) Query(_, query string) ([][]*string, error)

Query executes given query on database.

Jump to

Keyboard shortcuts

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