MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / getSelect

Function getSelect

pkg/transform/columns.go:24–30  ·  view source on GitHub ↗
(stmt ast.Statement, transform string)

Source from the content-addressed store, hash-verified

22)
23
24func getSelect(stmt ast.Statement, transform string) (*ast.SelectStatement, error) {
25 sel, ok := stmt.(*ast.SelectStatement)
26 if !ok {
27 return nil, &ErrUnsupportedStatement{Transform: transform, Got: stmtTypeName(stmt)}
28 }
29 return sel, nil
30}
31
32// AddColumn returns a Rule that appends a column expression to the SELECT list of
33// a SELECT statement. The expression may be any valid AST expression node such as

Callers 13

AddJoinFunction · 0.85
RemoveJoinFunction · 0.85
AddJoinFromSQLFunction · 0.85
SetLimitFunction · 0.85
SetOffsetFunction · 0.85
RemoveLimitFunction · 0.85
RemoveOffsetFunction · 0.85
AddOrderByFunction · 0.85
RemoveOrderByFunction · 0.85
QualifyColumnsFunction · 0.85
AddColumnFunction · 0.85
RemoveColumnFunction · 0.85

Calls 1

stmtTypeNameFunction · 0.70

Tested by

no test coverage detected