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{})
| 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 |
no outgoing calls