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 ¶
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 ¶
func (client *Client) EstimatedTableRowsCount(table string, opts RowsOptions) (*Result, error)
func (*Client) MaterializedView ¶
func (*Client) ServerVersion ¶
func (*Client) SetReadOnlyMode ¶
func (*Client) TableConstraints ¶
func (*Client) TableRows ¶
func (client *Client) TableRows(table string, opts RowsOptions) (*Result, error)
func (*Client) TableRowsCount ¶
func (client *Client) TableRowsCount(table string, opts RowsOptions) (*Result, error)
type Pagination ¶
type Result ¶
type Result struct { Pagination *Pagination `json:"pagination,omitempty"` Columns []string `json:"columns"` Rows []Row `json:"rows"` }
func (*Result) PrepareBigints ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.