MCPcopy Index your code
hub / github.com/upper/db / One

Method One

result.go:91–91  ·  view source on GitHub ↗

One fetches the first result within the result set and dumps it into the given pointer to struct or pointer to map. The result set is automatically closed after picking the element, so there is no need to call Close() after using One().

(ptrToStruct interface{})

Source from the content-addressed store, hash-verified

89 // closed after picking the element, so there is no need to call Close()
90 // after using One().
91 One(ptrToStruct interface{}) error
92
93 // All fetches all results within the result set and dumps them into the
94 // given pointer to slice of maps or structs. The result set is

Callers 15

OneMethod · 0.65
ExistsMethod · 0.65
CountMethod · 0.65
UpdateReturningMethod · 0.65
GetMethod · 0.65
OneMethod · 0.65
OneMethod · 0.65
TestFindOneMethod · 0.65
TestExpectCursorErrorMethod · 0.65
TestGetOneResultMethod · 0.65
TestInlineStructsMethod · 0.65

Implementers 2

Resultinternal/sqladapter/result.go
resultadapter/mongo/result.go

Calls

no outgoing calls

Tested by 15

testPostgreSQLTypesFunction · 0.52
TestOptionTypesMethod · 0.52
TestUpdateMethod · 0.52
TestOperatorsMethod · 0.52
TestDeleteMethod · 0.52
TestDataTypesMethod · 0.52
TestMySQLTypesMethod · 0.52