Documentation ¶
Overview ¶
Package stage1. check and init, we cannot support all features, we will try to remove these unsupported features. For features that cannot be removed, we will throw errors.
1. remove aggregate functions(and GROUP BY).
2. remove window functions.
3. remove LEFT|RIGHT JOIN
4. remove Limit
5. remove uncertain functions
Note that:
(1) we only support SELECT statement.
(2) make sure your sql has no side-effects, such as assign operations, SELECT into.
(3) The transformed sql may fail to execute.
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 ¶
func Init ¶
func Init(sql string) *InitResult
Init: for the input sql, remove aggregate functions(and GROUP BY), window functions, LEFT|RIGHT JOIN, LIMIT, uncertain functions.
Note that:
(1) we only support SELECT statement.
(2) make sure your sql has no side-effects, such as assign operations, SELECT into.
(3) The transformed sql may fail to execute.
func InitAndExec ¶
func InitAndExec(sql string, conn *connector.Connector) *InitResult
InitAndExec: Init + exec