MCPcopy
hub / github.com/sqldef/sqldef / NewWhere

Function NewWhere

parser/node.go:1903–1908  ·  view source on GitHub ↗

NewWhere creates a WHERE or HAVING clause out of a Expr. If the expression is nil, it returns nil.

(typ string, expr Expr)

Source from the content-addressed store, hash-verified

1901// NewWhere creates a WHERE or HAVING clause out
1902// of a Expr. If the expression is nil, it returns nil.
1903func NewWhere(typ string, expr Expr) *Where {
1904 if expr == nil {
1905 return nil
1906 }
1907 return &Where{Type: typ, Expr: expr}
1908}
1909
1910// Format formats the node.
1911func (node *Where) Format(buf *nodeBuffer) {

Callers 5

parseCreateStmtMethod · 0.92
parseExclusionMethod · 0.92
parseCheckConstraintMethod · 0.92
parseCreatePolicyStmtMethod · 0.92
ParseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected