db

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

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

func NewConnector

func NewConnector(username, password, host string, port int, usessl bool) (*Connector, error)

func NewConnectorWithDb

func NewConnectorWithDb(username, password, host string, port int, dbname string, usessl bool) (*Connector, error)

func (*Connector) Close

func (c *Connector) Close() error

func (*Connector) Exec

func (c *Connector) Exec(ctx context.Context, sql string, qid uint64) (int64, error)

func (*Connector) Query

func (c *Connector) Query(ctx context.Context, sql string, qid uint64) (*Data, error)

type Data

type Data struct {
	Head []string        `json:"head"`
	Data [][]interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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