stage1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package stage1: The implication oracle cannot handle these features, remove them.

1. remove aggregate functions

2. remove window functions.

3. remove LEFT|RIGHT JOIN

4. remove Limit

Note that:

(1) The transformed sql may fail to execute.

(2) we only Support SELECT statement.

How to use: see Init, InitAndExec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitResult

type InitResult struct {
	InitSql    string
	Err        error
	ExecResult *connector.Result
}

func Init

func Init(sql string) *InitResult

Init: for the input sql, remove aggregate function(and group by), window function, LEFT|RIGHT JOIN, Limit.

Note that:

(1) The transformed sql may fail to execute.

(2) we only Support SELECT statement.

func InitAndExec

func InitAndExec(sql string, conn *connector.Connector) *InitResult

InitAndExec: Init + exec

type InitVisitor

type InitVisitor struct {
}

InitVisitor: Remove aggregate function(and group by), window function, LEFT|RIGHT JOIN, Limit.

func (*InitVisitor) Enter

func (v *InitVisitor) Enter(in ast.Node) (ast.Node, bool)

func (*InitVisitor) Leave

func (v *InitVisitor) Leave(in ast.Node) (ast.Node, bool)

Jump to

Keyboard shortcuts

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