sqlite

package
v3.0.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Add any configuration options here
	CanOpenFromJS  bool
	CanCloseFromJS bool
	DBFile         string
}

type Plugin

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

func NewPlugin

func NewPlugin(config *Config) *Plugin

func (*Plugin) CallableByJS

func (p *Plugin) CallableByJS() []string

CallableByJS returns a list of exported methods that can be called from the frontend

func (*Plugin) Close

func (p *Plugin) Close() error

func (*Plugin) Execute

func (p *Plugin) Execute(query string, args ...any) error

func (*Plugin) Init

func (p *Plugin) Init() error

Init is called when the app is starting up. You can use this to initialise any resources you need.

func (*Plugin) InjectJS

func (p *Plugin) InjectJS() string

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns the name of the plugin. You should use the go module format e.g. github.com/myuser/myplugin

func (*Plugin) Open

func (p *Plugin) Open(dbPath string) (string, error)

func (*Plugin) Select

func (p *Plugin) Select(query string, args ...any) ([]map[string]any, error)

func (*Plugin) Shutdown

func (p *Plugin) Shutdown()

Shutdown is called when the app is shutting down You can use this to clean up any resources you have allocated

Jump to

Keyboard shortcuts

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