MCPcopy Create free account
hub / github.com/Masterminds/squirrel / TestLikeToSql

Function TestLikeToSql

expr_test.go:340–350  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

338}
339
340func TestLikeToSql(t *testing.T) {
341 b := Like{"name": "%irrel"}
342 sql, args, err := b.ToSql()
343 assert.NoError(t, err)
344
345 expectedSql := "name LIKE ?"
346 assert.Equal(t, expectedSql, sql)
347
348 expectedArgs := []interface{}{"%irrel"}
349 assert.Equal(t, expectedArgs, args)
350}
351
352func TestNotLikeToSql(t *testing.T) {
353 b := NotLike{"name": "%irrel"}

Callers

nothing calls this directly

Calls 1

ToSqlMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…