- Datatypes
- type Duration
- type LocalDate
- type LocalDateTime
- type LocalTime
- type Memory
- type Optional
- type OptionalBigInt
- type OptionalBool
- type OptionalBytes
- type OptionalDateTime
- type OptionalDuration
- type OptionalFloat32
- type OptionalFloat64
- type OptionalInt16
- type OptionalInt32
- type OptionalInt64
- type OptionalLocalDate
- type OptionalLocalDateTime
- type OptionalLocalTime
- type OptionalMemory
- type OptionalRelativeDuration
- type OptionalStr
- type OptionalUUID
- type RelativeDuration
- type UUID
Datatypes
type Duration
Duration represents the elapsed time between two instants as an int64 microsecond count.
type Duration int64
method String
func (d Duration) String() string
type LocalDate
LocalDate is a date without a time zone. https://www.edgedb.com/docs/stdlib/datetime#type::cal::local_date
type LocalDate struct {
// contains filtered or unexported fields
}
function NewLocalDate
func NewLocalDate(year int, month time.Month, day int) LocalDate
NewLocalDate returns a new LocalDate
method MarshalText
func (d LocalDate) MarshalText() ([]byte, error)
MarshalText returns d marshaled as text.
method String
func (d LocalDate) String() string
method UnmarshalText
func (d *LocalDate) UnmarshalText(b []byte) error
UnmarshalText unmarshals bytes into *d.
type LocalDateTime
LocalDateTime is a date and time without timezone. https://www.edgedb.com/docs/stdlib/datetime#type::cal::local_datetime
type LocalDateTime struct {
// contains filtered or unexported fields
}
function NewLocalDateTime
func NewLocalDateTime(
year int, month time.Month, day, hour, minute, second, microsecond int,
) LocalDateTime
NewLocalDateTime returns a new LocalDateTime
method MarshalText
func (dt LocalDateTime) MarshalText() ([]byte, error)
MarshalText returns dt marshaled as text.
method String
func (dt LocalDateTime) String() string
method UnmarshalText
func (dt *LocalDateTime) UnmarshalText(b []byte) error
UnmarshalText unmarshals bytes into *dt.
type LocalTime
LocalTime is a time without a time zone. https://www.edgedb.com/docs/stdlib/datetime#type::cal::local_time
type LocalTime struct {
// contains filtered or unexported fields
}
function NewLocalTime
func NewLocalTime(hour, minute, second, microsecond int) LocalTime
NewLocalTime returns a new LocalTime
method MarshalText
func (t LocalTime) MarshalText() ([]byte, error)
MarshalText returns t marshaled as text.
method String
func (t LocalTime) String() string
method UnmarshalText
func (t *LocalTime) UnmarshalText(b []byte) error
UnmarshalText unmarshals bytes into *t.
type Memory
Memory represents memory in bytes.
type Memory int64
method MarshalText
func (m Memory) MarshalText() ([]byte, error)
MarshalText returns m marshaled as text.
method String
func (m Memory) String() string
method UnmarshalText
func (m *Memory) UnmarshalText(b []byte) error
UnmarshalText unmarshals bytes into *m.
type Optional
Optional represents a shape field that is not required.
type Optional struct {
// contains filtered or unexported fields
}
method Missing
func (o *Optional) Missing() bool
Missing returns true if the value is missing.
method SetMissing
func (o *Optional) SetMissing(missing bool)
SetMissing sets the structs missing status. true means missing and false means present.
method Unset
func (o *Optional) Unset()
Unset marks the value a missing
type OptionalBigInt
OptionalBigInt is an optional *big.Int. Optional types must be used for out parameters when a shape field is not required.
type OptionalBigInt struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalBigInt) Get() (*big.Int, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalBigInt) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalBigInt) Set(val *big.Int)
Set sets the value.
method UnmarshalJSON
func (o *OptionalBigInt) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalBigInt) Unset()
Unset marks the value as missing.
type OptionalBool
OptionalBool is an optional bool. Optional types must be used for out parameters when a shape field is not required.
type OptionalBool struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalBool) Get() (bool, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalBool) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalBool) Set(val bool)
Set sets the value.
method UnmarshalJSON
func (o *OptionalBool) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalBool) Unset()
Unset marks the value as missing.
type OptionalBytes
OptionalBytes is an optional []byte. Optional types must be used for out parameters when a shape field is not required.
type OptionalBytes struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalBytes) Get() ([]byte, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalBytes) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalBytes) Set(val []byte)
Set sets the value.
method UnmarshalJSON
func (o *OptionalBytes) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalBytes) Unset()
Unset marks the value as missing.
type OptionalDateTime
OptionalDateTime is an optional time.Time. Optional types must be used for out parameters when a shape field is not required.
type OptionalDateTime struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalDateTime) Get() (time.Time, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalDateTime) Set(val time.Time)
Set sets the value.
method UnmarshalJSON
func (o *OptionalDateTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalDateTime) Unset()
Unset marks the value as missing.
type OptionalDuration
OptionalDuration is an optional Duration. Optional types must be used for out parameters when a shape field is not required.
type OptionalDuration struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalDuration) Get() (Duration, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalDuration) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalDuration) Set(val Duration)
Set sets the value.
method UnmarshalJSON
func (o *OptionalDuration) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalDuration) Unset()
Unset marks the value as missing.
type OptionalFloat32
OptionalFloat32 is an optional float32. Optional types must be used for out parameters when a shape field is not required.
type OptionalFloat32 struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalFloat32) Get() (float32, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalFloat32) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalFloat32) Set(val float32)
Set sets the value.
method UnmarshalJSON
func (o *OptionalFloat32) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalFloat32) Unset()
Unset marks the value as missing.
type OptionalFloat64
OptionalFloat64 is an optional float64. Optional types must be used for out parameters when a shape field is not required.
type OptionalFloat64 struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalFloat64) Get() (float64, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalFloat64) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalFloat64) Set(val float64)
Set sets the value.
method UnmarshalJSON
func (o *OptionalFloat64) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalFloat64) Unset()
Unset marks the value as missing.
type OptionalInt16
OptionalInt16 is an optional int16. Optional types must be used for out parameters when a shape field is not required.
type OptionalInt16 struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalInt16) Get() (int16, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalInt16) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalInt16) Set(val int16)
Set sets the value.
method UnmarshalJSON
func (o *OptionalInt16) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalInt16) Unset()
Unset marks the value as missing.
type OptionalInt32
OptionalInt32 is an optional int32. Optional types must be used for out parameters when a shape field is not required.
type OptionalInt32 struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalInt32) Get() (int32, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalInt32) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalInt32) Set(val int32)
Set sets the value.
method UnmarshalJSON
func (o *OptionalInt32) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalInt32) Unset()
Unset marks the value as missing.
type OptionalInt64
OptionalInt64 is an optional int64. Optional types must be used for out parameters when a shape field is not required.
type OptionalInt64 struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalInt64) Get() (int64, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalInt64) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalInt64) Set(val int64) *OptionalInt64
Set sets the value.
method UnmarshalJSON
func (o *OptionalInt64) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalInt64) Unset() *OptionalInt64
Unset marks the value as missing.
type OptionalLocalDate
OptionalLocalDate is an optional LocalDate. Optional types must be used for out parameters when a shape field is not required.
type OptionalLocalDate struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalLocalDate) Get() (LocalDate, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalLocalDate) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalLocalDate) Set(val LocalDate)
Set sets the value.
method UnmarshalJSON
func (o *OptionalLocalDate) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalLocalDate) Unset()
Unset marks the value as missing.
type OptionalLocalDateTime
OptionalLocalDateTime is an optional LocalDateTime. Optional types must be used for out parameters when a shape field is not required.
type OptionalLocalDateTime struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalLocalDateTime) Get() (LocalDateTime, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalLocalDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalLocalDateTime) Set(val LocalDateTime)
Set sets the value.
method UnmarshalJSON
func (o *OptionalLocalDateTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalLocalDateTime) Unset()
Unset marks the value as missing.
type OptionalLocalTime
OptionalLocalTime is an optional LocalTime. Optional types must be used for out parameters when a shape field is not required.
type OptionalLocalTime struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalLocalTime) Get() (LocalTime, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalLocalTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalLocalTime) Set(val LocalTime)
Set sets the value.
method UnmarshalJSON
func (o *OptionalLocalTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalLocalTime) Unset()
Unset marks the value as missing.
type OptionalMemory
OptionalMemory is an optional Memory. Optional types must be used for out parameters when a shape field is not required.
type OptionalMemory struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalMemory) Get() (Memory, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalMemory) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalMemory) Set(val Memory)
Set sets the value.
method UnmarshalJSON
func (o *OptionalMemory) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalMemory) Unset()
Unset marks the value as missing.
type OptionalRelativeDuration
OptionalRelativeDuration is an optional RelativeDuration. Optional types must be used for out parameters when a shape field is not required.
type OptionalRelativeDuration struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalRelativeDuration) Get() (RelativeDuration, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRelativeDuration) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalRelativeDuration) Set(val RelativeDuration)
Set sets the value.
method UnmarshalJSON
func (o *OptionalRelativeDuration) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalRelativeDuration) Unset()
Unset marks the value as missing.
type OptionalStr
OptionalStr is an optional string. Optional types must be used for out parameters when a shape field is not required.
type OptionalStr struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalStr) Get() (string, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalStr) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalStr) Set(val string)
Set sets the value.
method UnmarshalJSON
func (o *OptionalStr) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
method Unset
func (o *OptionalStr) Unset()
Unset marks the value as missing.
type OptionalUUID
OptionalUUID is an optional UUID. Optional types must be used for out parameters when a shape field is not required.
type OptionalUUID struct {
// contains filtered or unexported fields
}
method Get
func (o *OptionalUUID) Get() (UUID, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalUUID) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalUUID) Set(val UUID)
Set sets the value.
method UnmarshalJSON
func (o *OptionalUUID) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o
method Unset
func (o *OptionalUUID) Unset()
Unset marks the value as missing.
type RelativeDuration
RelativeDuration represents the elapsed time between two instants in a fuzzy human way.
type RelativeDuration struct {
// contains filtered or unexported fields
}
function NewRelativeDuration
func NewRelativeDuration(
months, days int32,
microseconds int64,
) RelativeDuration
NewRelativeDuration returns a new RelativeDuration
method MarshalText
func (rd RelativeDuration) MarshalText() ([]byte, error)
MarshalText returns rd marshaled as text.
method String
func (rd RelativeDuration) String() string
method UnmarshalText
func (rd *RelativeDuration) UnmarshalText(b []byte) error
UnmarshalText unmarshals bytes into *rd.
type UUID
UUID a universally unique identifier https://www.edgedb.com/docs/stdlib/uuid
type UUID [16]byte
function ParseUUID
func ParseUUID(s string) (UUID, error)
ParseUUID parses s into a UUID or returns an error.
method MarshalText
func (id UUID) MarshalText() ([]byte, error)
MarshalText returns the id as a byte string.
method String
func (id UUID) String() string
method UnmarshalText
func (id *UUID) UnmarshalText(b []byte) error
UnmarshalText unmarshals the id from a string.