Documentation
¶
Overview ¶
Package exprtest holds the render-only fixtures that the tests of a feature package (arrayop, fts, ...) need to see the SQL and arguments of a predicate or expression: a one-column projection row and a DB over the recording fake driver. Nothing here runs a statement.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compile ¶
Compile renders the predicate in "SELECT COUNT(*) FROM docs WHERE p" for the dialect and returns the statement.
func CompileColumns ¶
CompileColumns renders "SELECT cols FROM documents" for the dialect and returns the statement, for tests of a value expression.
Types ¶
type Pair ¶
Pair is a two-column projection fixture with no table of its own, for rendering a select list of an expression and a count, for example a grouped extraction. Select it with Columns(expr, momo.CountAll()).
type Tally ¶
type Tally struct{ N int64 }
Tally is a projection fixture with a single count column and no table of its own. Select it with Columns(momo.CountAll()).