MCPcopy Create free account
hub / github.com/go-pg/pg / ExampleHstore

Function ExampleHstore

example_hstore_test.go:39–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func ExampleHstore() {
40 src := map[string]string{"hello": "world"}
41 var dst map[string]string
42 _, err := pgdb.QueryOne(pg.Scan(pg.Hstore(&dst)), `SELECT ?`, pg.Hstore(src))
43 if err != nil {
44 panic(err)
45 }
46 fmt.Println(dst)
47 // Output: map[hello:world]
48}

Callers

nothing calls this directly

Calls 2

QueryOneMethod · 0.65
ScanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…