sql

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSessionFromEnv

func MakeSessionFromEnv() *pb.Session

MakeSessionFromEnv returns proto.Session which comes from the environment variables

func ResolveSQLProgram

func ResolveSQLProgram(sqlStmts []*parser.SQLFlowStmt, logger *log.Logger) ([]ir.SQLFlowStmt, error)

ResolveSQLProgram accepts parse result from parser and returns a list of SQLFlowStmt

func RewriteStatementsWithHints

func RewriteStatementsWithHints(stmts []*parser.SQLFlowStmt, dialect string) []*parser.SQLFlowStmt

RewriteStatementsWithHints combines the hints into the standard SQL(s)

FIXME(weiguoz): I'm not happy with such an implementation. I mean it is not clean that sqlflow handles such database relative details.

func RunSQLProgram

func RunSQLProgram(sqlProgram string, modelDir string, session *pb.Session) *pipe.Reader

RunSQLProgram run a SQL program.

TODO(wangkuiyi): Make RunSQLProgram return an error in addition to *pipe.Reader, and remove the calls to log.Printf.

Types

type EndOfExecution

type EndOfExecution struct {
	StartTime int64
	EndTime   int64
	Statement string
}

EndOfExecution will push to the pipe when one SQL statement execution is finished.

Jump to

Keyboard shortcuts

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