Documentation
¶
Index ¶
- func ExtractJSONPathAs[T any](o *JSON, path string) (T, bool)
- type Dynamic
- type JSON
- func (o *JSON) MarshalJSON() ([]byte, error)
- func (o *JSON) NestedMap() map[string]any
- func (o *JSON) Scan(value interface{}) error
- func (o *JSON) SetValueAtPath(path string, value any)
- func (o *JSON) Value() (driver.Value, error)
- func (o *JSON) ValueAtPath(path string) (any, bool)
- func (o *JSON) ValuesByPath() map[string]any
- type JSONDeserializer
- type JSONSerializer
- type Variant
- func (v Variant) Any() any
- func (v Variant) HasType() bool
- func (v Variant) MarshalJSON() ([]byte, error)
- func (v Variant) MarshalText() ([]byte, error)
- func (v Variant) Nil() bool
- func (v *Variant) Scan(value interface{}) error
- func (v Variant) Type() string
- func (v *Variant) UnmarshalJSON(data []byte) error
- func (v *Variant) UnmarshalText(text []byte) error
- func (v Variant) Value() (driver.Value, error)
- func (v Variant) WithType(chType string) Variant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dynamic ¶
type Dynamic = Variant
func NewDynamic ¶
NewDynamic creates a new Dynamic with the given value
func NewDynamicWithType ¶
NewDynamicWithType creates a new Dynamic with the given value and ClickHouse type
type JSON ¶
type JSON struct {
// contains filtered or unexported fields
}
JSON represents a ClickHouse JSON type that can hold multiple possible types
func (*JSON) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (*JSON) SetValueAtPath ¶
func (*JSON) ValuesByPath ¶
type JSONDeserializer ¶ added in v2.31.0
JSONDeserializer interface allows a struct to load its data from an optimized JSON structure instead of relying on recursive reflection to set its fields.
type JSONSerializer ¶ added in v2.31.0
JSONSerializer interface allows a struct to be manually converted to an optimized JSON structure instead of relying on recursive reflection. Note that the struct must be a pointer in order for the interface to be matched, reflection will be used otherwise.
type Variant ¶
type Variant struct {
// contains filtered or unexported fields
}
Variant represents a ClickHouse Variant type that can hold multiple possible types
func NewVariant ¶
NewVariant creates a new Variant with the given value
func NewVariantWithType ¶
NewVariantWithType creates a new Variant with the given value and ClickHouse type
func (Variant) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (Variant) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface
func (*Variant) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface
func (*Variant) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface