Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RawMessage ¶
type RawMessage json.RawMessage
RawMessage wraps json.RawMessage as a type to use for fragments of JSON metadata. Use this type if you need to represent all possible JSON values (including arrays, int literals, etc.). It's fine for passing data through from an API to Postgres without needing to touch it in Go, but not great if you need to access the data inside Go code. If you need to access the data in Go, and you're OK with being restricted to a map[string]interface{}, consider using pqjson.StringMap instead.
func (RawMessage) Empty ¶
func (rm RawMessage) Empty() bool
Empty returns true if the RawMessage's underlying byte slice is empty, false otherwise.
func (*RawMessage) Scan ¶
func (rm *RawMessage) Scan(src interface{}) error
Scan converts raw db bytes into a RawMessage.
type StringMap ¶
type StringMap map[string]interface{}
A StringMap is the Go representation of a JSON object, as stored in a Postgres JSONB field.
func (StringMap) Empty ¶
Empty returns true if the StringMap's underlying map is empty, false otherwise.