presto

package
v0.0.0-...-4ea7438 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(userName, password, host, port, catalog, schema string) string

Types

type Presto

type Presto struct {
	Error error
	// contains filtered or unexported fields
}

func Open

func Open(dsn string) (p *Presto, err error)

Open 打开 * 格式:http[s]://user[:pass]@host[:port][?parameters] 例子:http://root@bigdata.node-1:8081?catalog=hive&schema=test

func (*Presto) Close

func (p *Presto) Close()

Close 关闭

func (*Presto) Exec

func (p *Presto) Exec(sql string, args ...interface{}) *Presto

Exec 执行sql

func (*Presto) Find

func (p *Presto) Find(out interface{}) *Presto

Find 赋值

func (*Presto) First

func (p *Presto) First(out interface{}) *Presto

First 单行 首行首列

func (*Presto) Map

func (p *Presto) Map() (list []map[string]interface{}, err error)

Map 字典

func (*Presto) Query

func (p *Presto) Query(sql string, args ...interface{}) *Presto

Query 查询

Jump to

Keyboard shortcuts

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