MCPcopy
hub / github.com/gogf/gf / Test_DB_GetOne

Function Test_DB_GetOne

contrib/drivers/dm/dm_z_unit_basic_test.go:393–401  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

391}
392
393func Test_DB_GetOne(t *testing.T) {
394 table := "A_tables"
395 createInitTable(table)
396 gtest.C(t, func(t *gtest.T) {
397 record, err := db.GetOne(ctx, fmt.Sprintf("SELECT * FROM %s WHERE account_name=?", table), "name_4")
398 t.AssertNil(err)
399 t.Assert(record["ACCOUNT_NAME"].String(), "name_4")
400 })
401}
402
403func Test_DB_GetValue(t *testing.T) {
404 table := "A_tables"

Callers

nothing calls this directly

Calls 6

CFunction · 0.92
AssertNilMethod · 0.80
AssertMethod · 0.80
createInitTableFunction · 0.70
GetOneMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…