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

Function TestExtractExpression_SQL

pkg/sql/ast/sql_coverage_test.go:276–281  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

274}
275
276func TestExtractExpression_SQL(t *testing.T) {
277 e := &ExtractExpression{Field: "YEAR", Source: &Identifier{Name: "created_at"}}
278 if !strings.Contains(e.SQL(), "EXTRACT(YEAR FROM created_at)") {
279 t.Errorf("got: %s", e.SQL())
280 }
281}
282
283func TestPositionExpression_SQL(t *testing.T) {
284 p := &PositionExpression{Substr: &LiteralValue{Value: "'x'"}, Str: &Identifier{Name: "name"}}

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected