MCPcopy
hub / github.com/ent/ent / TestParamFormatter

Function TestParamFormatter

dialect/sql/builder_test.go:1722–1731  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1720}
1721
1722func TestParamFormatter(t *testing.T) {
1723 p := point{xy: []float64{1, 2}, T: t}
1724 query, args := Dialect(dialect.MySQL).
1725 Select().
1726 From(Table("users")).
1727 Where(EQ("point", p)).
1728 Query()
1729 require.Equal(t, "SELECT * FROM `users` WHERE `point` = ST_GeomFromWKB(?)", query)
1730 require.Equal(t, p, args[0])
1731}
1732
1733func TestSelectWithLock(t *testing.T) {
1734 query, args := Dialect(dialect.MySQL).

Callers

nothing calls this directly

Calls 7

DialectFunction · 0.85
TableFunction · 0.70
EQFunction · 0.70
QueryMethod · 0.65
WhereMethod · 0.65
FromMethod · 0.45
SelectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…