Documentation ¶
Index ¶
- func ObjectsFromResult(res *Result) map[string]*Objects
- type Client
- func (client *Client) Activity() (*Result, error)
- func (client *Client) Close() error
- func (client *Client) Databases() ([]string, error)
- func (client *Client) EstimatedTableRowsCount(table string, opts RowsOptions) (*Result, error)
- func (client *Client) Info() (*Result, error)
- func (client *Client) IsIdle() bool
- func (client *Client) MaterializedView(name string) (*Result, error)
- func (client *Client) Objects() (*Result, error)
- func (client *Client) Query(query string) (*Result, error)
- func (client *Client) Schemas() ([]string, error)
- func (client *Client) ServerVersion() string
- func (client *Client) SetReadOnlyMode() error
- func (client *Client) Table(table string) (*Result, error)
- func (client *Client) TableConstraints(table string) (*Result, error)
- func (client *Client) TableIndexes(table string) (*Result, error)
- func (client *Client) TableInfo(table string) (*Result, error)
- func (client *Client) TableRows(table string, opts RowsOptions) (*Result, error)
- func (client *Client) TableRowsCount(table string, opts RowsOptions) (*Result, error)
- func (client *Client) Test() error
- type Dump
- type Objects
- type Pagination
- type Result
- type Row
- type RowsOptions
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObjectsFromResult ¶ added in v0.9.0
Types ¶
type Client ¶
type Client struct { External bool History []history.Record `json:"history"` ConnectionString string `json:"connection_string"` // contains filtered or unexported fields }
func (*Client) EstimatedTableRowsCount ¶ added in v0.10.0
func (client *Client) EstimatedTableRowsCount(table string, opts RowsOptions) (*Result, error)
func (*Client) MaterializedView ¶ added in v0.9.0
func (*Client) ServerVersion ¶ added in v0.9.9
func (*Client) SetReadOnlyMode ¶ added in v0.9.6
func (*Client) TableConstraints ¶ added in v0.7.0
func (*Client) TableRows ¶
func (client *Client) TableRows(table string, opts RowsOptions) (*Result, error)
func (*Client) TableRowsCount ¶ added in v0.8.0
func (client *Client) TableRowsCount(table string, opts RowsOptions) (*Result, error)
type Pagination ¶ added in v0.8.0
type Result ¶
type Result struct { Pagination *Pagination `json:"pagination,omitempty"` Columns []string `json:"columns"` Rows []Row `json:"rows"` }
func (*Result) PrepareBigints ¶ added in v0.8.0
func (res *Result) PrepareBigints()
Due to big int number limitations in javascript, numbers should be encoded as strings so they could be properly loaded on the frontend.
type RowsOptions ¶
type RowsOptions struct { Where string // Custom filter Offset int // Number of rows to skip Limit int // Number of rows to fetch SortColumn string // Column to sort by SortOrder string // Sort direction (ASC, DESC) }
Struct to hold table rows browsing options
type Tunnel ¶ added in v0.9.0
type Tunnel struct { TargetHost string TargetPort string Port int SSHInfo *shared.SSHInfo Config *ssh.ClientConfig Client *ssh.Client Listener *net.TCPListener }
Tunnel represents the connection between local and remote server
func (*Tunnel) Close ¶ added in v0.9.0
func (tunnel *Tunnel) Close()
Close closes the tunnel connection
Click to show internal directories.
Click to hide internal directories.