dribble

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

README

dribble

Go tool for database querying

Documentation

Index

Constants

View Source
const Version = "0.0.1"

Variables

View Source
var (
	ErrNoTarget   = errors.New("no target provided")
	ErrNoRequests = errors.New("no requests provided")
)

Functions

func ErrTargetNotFound

func ErrTargetNotFound(targetName string) error

func ErrUpdateTarget

func ErrUpdateTarget(targetName string, err error) error

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) CloseTarget

func (c *Client) CloseTarget(ctx context.Context, targetName string) error

func (*Client) CloseTargets

func (c *Client) CloseTargets(ctx context.Context, targets ...string) error

func (*Client) OpenTarget

func (c *Client) OpenTarget(ctx context.Context, t *target.Target) error

func (*Client) OpenTargets

func (c *Client) OpenTargets(ctx context.Context, targets ...*target.Target) error

func (*Client) PerformForAll

func (c *Client) PerformForAll(ctx context.Context, handler ResponseHandler, req database.Request) error

no targets = NoOp

func (*Client) PerformWithHandler

func (c *Client) PerformWithHandler(ctx context.Context, handler ResponseHandler, targetName string, req database.Request) error

Blocking

func (*Client) PingTarget

func (c *Client) PingTarget(ctx context.Context, targetName string) error

func (*Client) Request

func (c *Client) Request(ctx context.Context, targetName string, request database.Request) (chan *request.Response, error)

func (*Client) RequestForAll

func (c *Client) RequestForAll(ctx context.Context, req database.Request) (chan *request.Response, error)

no targets = NoOp

func (*Client) RequestWithHandler

func (c *Client) RequestWithHandler(ctx context.Context, handler ResponseHandler, targetName string, req database.Request) error

Non-Blocking

func (*Client) String

func (c *Client) String() string

func (*Client) Target

func (c *Client) Target(targetName string) (*target.Target, bool)

func (*Client) UpdateTarget

func (c *Client) UpdateTarget(ctx context.Context, targetName string, opts ...target.TargetOption) error

type DatabaseListFetchData

type DatabaseListFetchData struct {
	Driver    string
	Databases []*target.Target
}

type EventHandler

type EventHandler func(eventType request.Status, args any, err error)

type ExecuteQuery

type ExecuteQuery struct {
	Driver   string
	Database string
	Table    string
	Query    string
}

type QueryResult

type QueryResult struct {
	Query string
	Value any
	List  []any
	Table *result.Table
}

type ResponseHandler

type ResponseHandler func(*request.Response)

type TableCountFetchData

type TableCountFetchData struct {
	TableName string
	Counts    map[string]int
	Errors    map[string]error
}

type TableFetchData

type TableFetchData struct {
	TableName string
	Table     *result.Table
}

type TableListFetchData

type TableListFetchData struct {
	Database string
	Tables   []string
}

Jump to

Keyboard shortcuts

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