geltypes

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateDuration

type DateDuration struct {
	// contains filtered or unexported fields
}

DateDuration represents the elapsed time between two dates in a fuzzy human way.

func NewDateDuration

func NewDateDuration(months int32, days int32) DateDuration

NewDateDuration returns a new DateDuration

func (DateDuration) MarshalText

func (dd DateDuration) MarshalText() ([]byte, error)

MarshalText returns dd marshaled as text.

func (DateDuration) String

func (dd DateDuration) String() string

func (*DateDuration) UnmarshalText

func (dd *DateDuration) UnmarshalText(b []byte) error

UnmarshalText unmarshals bytes into *dd.

type Duration

type Duration int64

Duration represents the elapsed time between two instants as an int64 microsecond count.

func DurationFromNanoseconds

func DurationFromNanoseconds(d time.Duration) Duration

DurationFromNanoseconds creates a Duration represented as microseconds from a time.Duration represented as nanoseconds.

func ParseDuration

func ParseDuration(s string) (Duration, error)

ParseDuration parses a Gel duration string.

func (Duration) AsNanoseconds

func (d Duration) AsNanoseconds() (time.Duration, error)

AsNanoseconds returns time.Duration represented as nanoseconds, after transforming from Duration microsecond representation. Returns an error if the Duration is too long and would cause an overflow of the internal int64 representation.

func (Duration) String

func (d Duration) String() string

type Executor

type Executor interface {
	Execute(context.Context, string, ...any) error
	ExecuteSQL(context.Context, string, ...any) error
	Query(context.Context, string, any, ...any) error
	QueryJSON(context.Context, string, *[]byte, ...any) error
	QuerySQL(context.Context, string, any, ...any) error
	QuerySingle(context.Context, string, any, ...any) error
	QuerySingleJSON(context.Context, string, any, ...any) error
}

Executor is a common interface between *gel.Client and Tx, that can run queries on a Gel database.

type LocalDate

type LocalDate struct {
	// contains filtered or unexported fields
}

LocalDate represents cal::local_date, a date without a timezone.

func NewLocalDate

func NewLocalDate(year int, month time.Month, day int) LocalDate

NewLocalDate returns a new LocalDate

func (LocalDate) MarshalText

func (d LocalDate) MarshalText() ([]byte, error)

MarshalText returns d marshaled as text.

func (LocalDate) String

func (d LocalDate) String() string

func (*LocalDate) UnmarshalText

func (d *LocalDate) UnmarshalText(b []byte) error

UnmarshalText unmarshals bytes into *d.

type LocalDateTime

type LocalDateTime struct {
	// contains filtered or unexported fields
}

LocalDateTime represents cal::local_datetime, a date and time without a timezone.

func NewLocalDateTime

func NewLocalDateTime(
	year int, month time.Month, day, hour, minute, second, microsecond int,
) LocalDateTime

NewLocalDateTime returns a new LocalDateTime

func (LocalDateTime) MarshalText

func (dt LocalDateTime) MarshalText() ([]byte, error)

MarshalText returns dt marshaled as text.

func (LocalDateTime) String

func (dt LocalDateTime) String() string

func (*LocalDateTime) UnmarshalText

func (dt *LocalDateTime) UnmarshalText(b []byte) error

UnmarshalText unmarshals bytes into *dt.

type LocalTime

type LocalTime struct {
	// contains filtered or unexported fields
}

LocalTime represents cal::local_time, a time without a timezone.

func NewLocalTime

func NewLocalTime(hour, minute, second, microsecond int) LocalTime

NewLocalTime returns a new LocalTime

func (LocalTime) MarshalText

func (t LocalTime) MarshalText() ([]byte, error)

MarshalText returns t marshaled as text.

func (LocalTime) String

func (t LocalTime) String() string

func (*LocalTime) UnmarshalText

func (t *LocalTime) UnmarshalText(b []byte) error

UnmarshalText unmarshals bytes into *t.

type Memory

type Memory int64

Memory represents memory in bytes.

func (Memory) MarshalText

func (m Memory) MarshalText() ([]byte, error)

MarshalText returns m marshaled as text.

func (Memory) String

func (m Memory) String() string

func (*Memory) UnmarshalText

func (m *Memory) UnmarshalText(b []byte) error

UnmarshalText unmarshals bytes into *m.

type MultiRangeDateTime

type MultiRangeDateTime = []RangeDateTime

MultiRangeDateTime is a type alias for a slice of RangeDateTime values.

type MultiRangeFloat32

type MultiRangeFloat32 = []RangeFloat32

MultiRangeFloat32 is a type alias for a slice of RangeFloat32 values.

type MultiRangeFloat64

type MultiRangeFloat64 = []RangeFloat64

MultiRangeFloat64 is a type alias for a slice of RangeFloat64 values.

type MultiRangeInt32

type MultiRangeInt32 = []RangeInt32

MultiRangeInt32 is a type alias for a slice of RangeInt32 values.

type MultiRangeInt64

type MultiRangeInt64 = []RangeInt64

MultiRangeInt64 is a type alias for a slice of RangeInt64 values.

type MultiRangeLocalDate

type MultiRangeLocalDate = []RangeLocalDate

MultiRangeLocalDate is a type alias for a slice of RangeLocalDate values.

type MultiRangeLocalDateTime

type MultiRangeLocalDateTime = []RangeLocalDateTime

MultiRangeLocalDateTime is a type alias for a slice of RangeLocalDateTime values.

type Optional

type Optional struct {
	// contains filtered or unexported fields
}

Optional represents a shape field that is not required. Optional is embedded in structs to make them optional.

Example
type User struct {
	geltypes.Optional
	Name string `gel:"name"`
}

var result User
query := `
		SELECT User { name }
		FILTER .name = "doesn't exist"
		LIMIT 1
	`
err := client.QuerySingle(ctx, query, &result)
if err != nil {
	log.Fatal(err)
}
fmt.Println(result.Missing())

err = client.QuerySingle(ctx, `SELECT User { name } LIMIT 1`, &result)
if err != nil {
	log.Fatal(err)
}
fmt.Println(result.Missing())
Output:

true
false

func (*Optional) Missing

func (o *Optional) Missing() bool

Missing returns true if the value is missing.

func (*Optional) SetMissing

func (o *Optional) SetMissing(missing bool)

SetMissing sets the structs missing status. true means missing and false means present.

func (*Optional) Unset

func (o *Optional) Unset()

Unset marks the value as missing

type OptionalBigInt

type OptionalBigInt struct {
	// contains filtered or unexported fields
}

OptionalBigInt is an optional *big.Int. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalBigInt

func NewOptionalBigInt(v *big.Int) OptionalBigInt

NewOptionalBigInt is a convenience function for creating an OptionalBigInt with its value set to v.

func (OptionalBigInt) Get

func (o OptionalBigInt) Get() (*big.Int, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalBigInt) MarshalJSON

func (o OptionalBigInt) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalBigInt) Set

func (o *OptionalBigInt) Set(val *big.Int)

Set sets the value.

func (*OptionalBigInt) UnmarshalJSON

func (o *OptionalBigInt) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalBigInt) Unset

func (o *OptionalBigInt) Unset()

Unset marks the value as missing.

type OptionalBool

type OptionalBool struct {
	// contains filtered or unexported fields
}

OptionalBool is an optional bool. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalBool

func NewOptionalBool(v bool) OptionalBool

NewOptionalBool is a convenience function for creating an OptionalBool with its value set to v.

func (OptionalBool) Get

func (o OptionalBool) Get() (bool, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalBool) MarshalJSON

func (o OptionalBool) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalBool) Set

func (o *OptionalBool) Set(val bool)

Set sets the value.

func (*OptionalBool) UnmarshalJSON

func (o *OptionalBool) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalBool) Unset

func (o *OptionalBool) Unset()

Unset marks the value as missing.

type OptionalBytes

type OptionalBytes struct {
	// contains filtered or unexported fields
}

OptionalBytes is an optional []byte. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalBytes

func NewOptionalBytes(v []byte) OptionalBytes

NewOptionalBytes is a convenience function for creating an OptionalBytes with its value set to v.

func (OptionalBytes) Get

func (o OptionalBytes) Get() ([]byte, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalBytes) MarshalJSON

func (o OptionalBytes) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalBytes) Set

func (o *OptionalBytes) Set(val []byte)

Set sets the value.

func (*OptionalBytes) UnmarshalJSON

func (o *OptionalBytes) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalBytes) Unset

func (o *OptionalBytes) Unset()

Unset marks the value as missing.

type OptionalDateDuration

type OptionalDateDuration struct {
	// contains filtered or unexported fields
}

OptionalDateDuration is an optional DateDuration. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalDateDuration

func NewOptionalDateDuration(v DateDuration) OptionalDateDuration

NewOptionalDateDuration is a convenience function for creating an OptionalDateDuration with its value set to v.

func (*OptionalDateDuration) Get

Get returns the value and a boolean indicating if the value is present.

func (OptionalDateDuration) MarshalJSON

func (o OptionalDateDuration) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalDateDuration) Set

func (o *OptionalDateDuration) Set(val DateDuration)

Set sets the value.

func (*OptionalDateDuration) UnmarshalJSON

func (o *OptionalDateDuration) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalDateDuration) Unset

func (o *OptionalDateDuration) Unset()

Unset marks the value as missing.

type OptionalDateTime

type OptionalDateTime struct {
	// contains filtered or unexported fields
}

OptionalDateTime is an optional time.Time. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalDateTime

func NewOptionalDateTime(v time.Time) OptionalDateTime

NewOptionalDateTime is a convenience function for creating an OptionalDateTime with its value set to v.

func (OptionalDateTime) Get

func (o OptionalDateTime) Get() (time.Time, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalDateTime) MarshalJSON

func (o OptionalDateTime) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalDateTime) Set

func (o *OptionalDateTime) Set(val time.Time)

Set sets the value.

func (*OptionalDateTime) UnmarshalJSON

func (o *OptionalDateTime) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalDateTime) Unset

func (o *OptionalDateTime) Unset()

Unset marks the value as missing.

type OptionalDuration

type OptionalDuration struct {
	// contains filtered or unexported fields
}

OptionalDuration is an optional Duration. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalDuration

func NewOptionalDuration(v Duration) OptionalDuration

NewOptionalDuration is a convenience function for creating an OptionalDuration with its value set to v.

func (OptionalDuration) Get

func (o OptionalDuration) Get() (Duration, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalDuration) MarshalJSON

func (o OptionalDuration) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalDuration) Set

func (o *OptionalDuration) Set(val Duration)

Set sets the value.

func (*OptionalDuration) UnmarshalJSON

func (o *OptionalDuration) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalDuration) Unset

func (o *OptionalDuration) Unset()

Unset marks the value as missing.

type OptionalFloat32

type OptionalFloat32 struct {
	// contains filtered or unexported fields
}

OptionalFloat32 is an optional float32. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalFloat32

func NewOptionalFloat32(v float32) OptionalFloat32

NewOptionalFloat32 is a convenience function for creating an OptionalFloat32 with its value set to v.

func (OptionalFloat32) Get

func (o OptionalFloat32) Get() (float32, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalFloat32) MarshalJSON

func (o OptionalFloat32) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalFloat32) Set

func (o *OptionalFloat32) Set(val float32)

Set sets the value.

func (*OptionalFloat32) UnmarshalJSON

func (o *OptionalFloat32) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalFloat32) Unset

func (o *OptionalFloat32) Unset()

Unset marks the value as missing.

type OptionalFloat64

type OptionalFloat64 struct {
	// contains filtered or unexported fields
}

OptionalFloat64 is an optional float64. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalFloat64

func NewOptionalFloat64(v float64) OptionalFloat64

NewOptionalFloat64 is a convenience function for creating an OptionalFloat64 with its value set to v.

func (OptionalFloat64) Get

func (o OptionalFloat64) Get() (float64, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalFloat64) MarshalJSON

func (o OptionalFloat64) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalFloat64) Set

func (o *OptionalFloat64) Set(val float64)

Set sets the value.

func (*OptionalFloat64) UnmarshalJSON

func (o *OptionalFloat64) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalFloat64) Unset

func (o *OptionalFloat64) Unset()

Unset marks the value as missing.

type OptionalInt16

type OptionalInt16 struct {
	// contains filtered or unexported fields
}

OptionalInt16 is an optional int16. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalInt16

func NewOptionalInt16(v int16) OptionalInt16

NewOptionalInt16 is a convenience function for creating an OptionalInt16 with its value set to v.

func (OptionalInt16) Get

func (o OptionalInt16) Get() (int16, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalInt16) MarshalJSON

func (o OptionalInt16) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalInt16) Set

func (o *OptionalInt16) Set(val int16)

Set sets the value.

func (*OptionalInt16) UnmarshalJSON

func (o *OptionalInt16) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalInt16) Unset

func (o *OptionalInt16) Unset()

Unset marks the value as missing.

type OptionalInt32

type OptionalInt32 struct {
	// contains filtered or unexported fields
}

OptionalInt32 is an optional int32. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalInt32

func NewOptionalInt32(v int32) OptionalInt32

NewOptionalInt32 is a convenience function for creating an OptionalInt32 with its value set to v.

func (OptionalInt32) Get

func (o OptionalInt32) Get() (int32, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalInt32) MarshalJSON

func (o OptionalInt32) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalInt32) Set

func (o *OptionalInt32) Set(val int32)

Set sets the value.

func (*OptionalInt32) UnmarshalJSON

func (o *OptionalInt32) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalInt32) Unset

func (o *OptionalInt32) Unset()

Unset marks the value as missing.

type OptionalInt64

type OptionalInt64 struct {
	// contains filtered or unexported fields
}

OptionalInt64 is an optional int64. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalInt64

func NewOptionalInt64(v int64) OptionalInt64

NewOptionalInt64 is a convenience function for creating an OptionalInt64 with its value set to v.

func (OptionalInt64) Get

func (o OptionalInt64) Get() (int64, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalInt64) MarshalJSON

func (o OptionalInt64) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalInt64) Set

func (o *OptionalInt64) Set(val int64) *OptionalInt64

Set sets the value.

func (*OptionalInt64) UnmarshalJSON

func (o *OptionalInt64) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalInt64) Unset

func (o *OptionalInt64) Unset() *OptionalInt64

Unset marks the value as missing.

type OptionalLocalDate

type OptionalLocalDate struct {
	// contains filtered or unexported fields
}

OptionalLocalDate is an optional LocalDate. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalLocalDate

func NewOptionalLocalDate(v LocalDate) OptionalLocalDate

NewOptionalLocalDate is a convenience function for creating an OptionalLocalDate with its value set to v.

func (OptionalLocalDate) Get

func (o OptionalLocalDate) Get() (LocalDate, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalLocalDate) MarshalJSON

func (o OptionalLocalDate) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalLocalDate) Set

func (o *OptionalLocalDate) Set(val LocalDate)

Set sets the value.

func (*OptionalLocalDate) UnmarshalJSON

func (o *OptionalLocalDate) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalLocalDate) Unset

func (o *OptionalLocalDate) Unset()

Unset marks the value as missing.

type OptionalLocalDateTime

type OptionalLocalDateTime struct {
	// contains filtered or unexported fields
}

OptionalLocalDateTime is an optional LocalDateTime. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalLocalDateTime

func NewOptionalLocalDateTime(v LocalDateTime) OptionalLocalDateTime

NewOptionalLocalDateTime is a convenience function for creating an OptionalLocalDateTime with its value set to v.

func (OptionalLocalDateTime) Get

Get returns the value and a boolean indicating if the value is present.

func (OptionalLocalDateTime) MarshalJSON

func (o OptionalLocalDateTime) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalLocalDateTime) Set

Set sets the value.

func (*OptionalLocalDateTime) UnmarshalJSON

func (o *OptionalLocalDateTime) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalLocalDateTime) Unset

func (o *OptionalLocalDateTime) Unset()

Unset marks the value as missing.

type OptionalLocalTime

type OptionalLocalTime struct {
	// contains filtered or unexported fields
}

OptionalLocalTime is an optional LocalTime. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalLocalTime

func NewOptionalLocalTime(v LocalTime) OptionalLocalTime

NewOptionalLocalTime is a convenience function for creating an OptionalLocalTime with its value set to v.

func (OptionalLocalTime) Get

func (o OptionalLocalTime) Get() (LocalTime, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalLocalTime) MarshalJSON

func (o OptionalLocalTime) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalLocalTime) Set

func (o *OptionalLocalTime) Set(val LocalTime)

Set sets the value.

func (*OptionalLocalTime) UnmarshalJSON

func (o *OptionalLocalTime) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalLocalTime) Unset

func (o *OptionalLocalTime) Unset()

Unset marks the value as missing.

type OptionalMemory

type OptionalMemory struct {
	// contains filtered or unexported fields
}

OptionalMemory is an optional Memory. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalMemory

func NewOptionalMemory(v Memory) OptionalMemory

NewOptionalMemory is a convenience function for creating an OptionalMemory with its value set to v.

func (OptionalMemory) Get

func (o OptionalMemory) Get() (Memory, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalMemory) MarshalJSON

func (o OptionalMemory) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalMemory) Set

func (o *OptionalMemory) Set(val Memory)

Set sets the value.

func (*OptionalMemory) UnmarshalJSON

func (o *OptionalMemory) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalMemory) Unset

func (o *OptionalMemory) Unset()

Unset marks the value as missing.

type OptionalRangeDateTime

type OptionalRangeDateTime struct {
	// contains filtered or unexported fields
}

OptionalRangeDateTime is an optional RangeDateTime. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRangeDateTime

func NewOptionalRangeDateTime(v RangeDateTime) OptionalRangeDateTime

NewOptionalRangeDateTime is a convenience function for creating an OptionalRangeDateTime with its value set to v.

func (*OptionalRangeDateTime) Get

Get returns the value and a boolean indicating if the value is present.

func (*OptionalRangeDateTime) MarshalJSON

func (o *OptionalRangeDateTime) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRangeDateTime) Set

Set sets the value.

func (*OptionalRangeDateTime) UnmarshalJSON

func (o *OptionalRangeDateTime) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRangeDateTime) Unset

func (o *OptionalRangeDateTime) Unset()

Unset marks the value as missing.

type OptionalRangeFloat32

type OptionalRangeFloat32 struct {
	// contains filtered or unexported fields
}

OptionalRangeFloat32 is an optional RangeFloat32. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRangeFloat32

func NewOptionalRangeFloat32(v RangeFloat32) OptionalRangeFloat32

NewOptionalRangeFloat32 is a convenience function for creating an OptionalRangeFloat32 with its value set to v.

func (OptionalRangeFloat32) Get

Get returns the value and a boolean indicating if the value is present.

func (OptionalRangeFloat32) MarshalJSON

func (o OptionalRangeFloat32) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRangeFloat32) Set

func (o *OptionalRangeFloat32) Set(val RangeFloat32)

Set sets the value.

func (*OptionalRangeFloat32) UnmarshalJSON

func (o *OptionalRangeFloat32) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRangeFloat32) Unset

func (o *OptionalRangeFloat32) Unset()

Unset marks the value as missing.

type OptionalRangeFloat64

type OptionalRangeFloat64 struct {
	// contains filtered or unexported fields
}

OptionalRangeFloat64 is an optional RangeFloat64. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRangeFloat64

func NewOptionalRangeFloat64(v RangeFloat64) OptionalRangeFloat64

NewOptionalRangeFloat64 is a convenience function for creating an OptionalRangeFloat64 with its value set to v.

func (OptionalRangeFloat64) Get

Get returns the value and a boolean indicating if the value is present.

func (OptionalRangeFloat64) MarshalJSON

func (o OptionalRangeFloat64) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRangeFloat64) Set

func (o *OptionalRangeFloat64) Set(val RangeFloat64)

Set sets the value.

func (*OptionalRangeFloat64) UnmarshalJSON

func (o *OptionalRangeFloat64) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRangeFloat64) Unset

func (o *OptionalRangeFloat64) Unset()

Unset marks the value as missing.

type OptionalRangeInt32

type OptionalRangeInt32 struct {
	// contains filtered or unexported fields
}

OptionalRangeInt32 is an optional RangeInt32. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRangeInt32

func NewOptionalRangeInt32(v RangeInt32) OptionalRangeInt32

NewOptionalRangeInt32 is a convenience function for creating an OptionalRangeInt32 with its value set to v.

func (OptionalRangeInt32) Get

func (o OptionalRangeInt32) Get() (RangeInt32, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalRangeInt32) MarshalJSON

func (o OptionalRangeInt32) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRangeInt32) Set

func (o *OptionalRangeInt32) Set(val RangeInt32)

Set sets the value.

func (*OptionalRangeInt32) UnmarshalJSON

func (o *OptionalRangeInt32) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRangeInt32) Unset

func (o *OptionalRangeInt32) Unset()

Unset marks the value as missing.

type OptionalRangeInt64

type OptionalRangeInt64 struct {
	// contains filtered or unexported fields
}

OptionalRangeInt64 is an optional RangeInt64. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRangeInt64

func NewOptionalRangeInt64(v RangeInt64) OptionalRangeInt64

NewOptionalRangeInt64 is a convenience function for creating an OptionalRangeInt64 with its value set to v.

func (OptionalRangeInt64) Get

func (o OptionalRangeInt64) Get() (RangeInt64, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalRangeInt64) MarshalJSON

func (o OptionalRangeInt64) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRangeInt64) Set

func (o *OptionalRangeInt64) Set(val RangeInt64)

Set sets the value.

func (*OptionalRangeInt64) UnmarshalJSON

func (o *OptionalRangeInt64) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRangeInt64) Unset

func (o *OptionalRangeInt64) Unset()

Unset marks the value as missing.

type OptionalRangeLocalDate

type OptionalRangeLocalDate struct {
	// contains filtered or unexported fields
}

OptionalRangeLocalDate is an optional RangeLocalDate. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRangeLocalDate

func NewOptionalRangeLocalDate(v RangeLocalDate) OptionalRangeLocalDate

NewOptionalRangeLocalDate is a convenience function for creating an OptionalRangeLocalDate with its value set to v.

func (OptionalRangeLocalDate) Get

Get returns the value and a boolean indicating if the value is present.

func (OptionalRangeLocalDate) MarshalJSON

func (o OptionalRangeLocalDate) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRangeLocalDate) Set

Set sets the value.

func (*OptionalRangeLocalDate) UnmarshalJSON

func (o *OptionalRangeLocalDate) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRangeLocalDate) Unset

func (o *OptionalRangeLocalDate) Unset()

Unset marks the value as missing.

type OptionalRangeLocalDateTime

type OptionalRangeLocalDateTime struct {
	// contains filtered or unexported fields
}

OptionalRangeLocalDateTime is an optional RangeLocalDateTime. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRangeLocalDateTime

func NewOptionalRangeLocalDateTime(
	v RangeLocalDateTime,
) OptionalRangeLocalDateTime

NewOptionalRangeLocalDateTime is a convenience function for creating an OptionalRangeLocalDateTime with its value set to v.

func (OptionalRangeLocalDateTime) Get

Get returns the value and a boolean indicating if the value is present.

func (OptionalRangeLocalDateTime) MarshalJSON

func (o OptionalRangeLocalDateTime) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRangeLocalDateTime) Set

Set sets the value.

func (*OptionalRangeLocalDateTime) UnmarshalJSON

func (o *OptionalRangeLocalDateTime) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRangeLocalDateTime) Unset

func (o *OptionalRangeLocalDateTime) Unset()

Unset marks the value as missing.

type OptionalRelativeDuration

type OptionalRelativeDuration struct {
	// contains filtered or unexported fields
}

OptionalRelativeDuration is an optional RelativeDuration. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalRelativeDuration

func NewOptionalRelativeDuration(v RelativeDuration) OptionalRelativeDuration

NewOptionalRelativeDuration is a convenience function for creating an OptionalRelativeDuration with its value set to v.

func (OptionalRelativeDuration) Get

Get returns the value and a boolean indicating if the value is present.

func (OptionalRelativeDuration) MarshalJSON

func (o OptionalRelativeDuration) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalRelativeDuration) Set

Set sets the value.

func (*OptionalRelativeDuration) UnmarshalJSON

func (o *OptionalRelativeDuration) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalRelativeDuration) Unset

func (o *OptionalRelativeDuration) Unset()

Unset marks the value as missing.

type OptionalStr

type OptionalStr struct {
	// contains filtered or unexported fields
}

OptionalStr is an optional string. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalStr

func NewOptionalStr(v string) OptionalStr

NewOptionalStr is a convenience function for creating an OptionalStr with its value set to v.

func (OptionalStr) Get

func (o OptionalStr) Get() (string, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalStr) MarshalJSON

func (o OptionalStr) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalStr) Set

func (o *OptionalStr) Set(val string)

Set sets the value.

func (*OptionalStr) UnmarshalJSON

func (o *OptionalStr) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o.

func (*OptionalStr) Unset

func (o *OptionalStr) Unset()

Unset marks the value as missing.

type OptionalUUID

type OptionalUUID struct {
	// contains filtered or unexported fields
}

OptionalUUID is an optional UUID. Optional types must be used for out parameters when a shape field is not required.

func NewOptionalUUID

func NewOptionalUUID(v UUID) OptionalUUID

NewOptionalUUID is a convenience function for creating an OptionalUUID with its value set to v.

func (OptionalUUID) Get

func (o OptionalUUID) Get() (UUID, bool)

Get returns the value and a boolean indicating if the value is present.

func (OptionalUUID) MarshalJSON

func (o OptionalUUID) MarshalJSON() ([]byte, error)

MarshalJSON returns o marshaled as json.

func (*OptionalUUID) Set

func (o *OptionalUUID) Set(val UUID)

Set sets the value.

func (*OptionalUUID) UnmarshalJSON

func (o *OptionalUUID) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals bytes into *o

func (*OptionalUUID) Unset

func (o *OptionalUUID) Unset()

Unset marks the value as missing.

type RangeDateTime

type RangeDateTime struct {
	// contains filtered or unexported fields
}

RangeDateTime is an interval of time.Time values.

func NewRangeDateTime

func NewRangeDateTime(
	lower, upper OptionalDateTime,
	incLower, incUpper bool,
) RangeDateTime

NewRangeDateTime creates a new RangeDateTime value.

func (RangeDateTime) Empty

func (r RangeDateTime) Empty() bool

Empty returns true if the range is empty.

func (RangeDateTime) IncLower

func (r RangeDateTime) IncLower() bool

IncLower returns true if the lower bound is inclusive.

func (RangeDateTime) IncUpper

func (r RangeDateTime) IncUpper() bool

IncUpper returns true if the upper bound is inclusive.

func (RangeDateTime) Lower

func (r RangeDateTime) Lower() OptionalDateTime

Lower returns the lower bound.

func (RangeDateTime) MarshalJSON

func (r RangeDateTime) MarshalJSON() ([]byte, error)

MarshalJSON returns r marshaled as json.

func (*RangeDateTime) UnmarshalJSON

func (r *RangeDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals bytes into *r.

func (RangeDateTime) Upper

func (r RangeDateTime) Upper() OptionalDateTime

Upper returns the upper bound.

type RangeFloat32

type RangeFloat32 struct {
	// contains filtered or unexported fields
}

RangeFloat32 is an interval of float32 values.

func NewRangeFloat32

func NewRangeFloat32(
	lower, upper OptionalFloat32,
	incLower, incUpper bool,
) RangeFloat32

NewRangeFloat32 creates a new RangeFloat32 value.

func (RangeFloat32) Empty

func (r RangeFloat32) Empty() bool

Empty returns true if the range is empty.

func (RangeFloat32) IncLower

func (r RangeFloat32) IncLower() bool

IncLower returns true if the lower bound is inclusive.

func (RangeFloat32) IncUpper

func (r RangeFloat32) IncUpper() bool

IncUpper returns true if the upper bound is inclusive.

func (RangeFloat32) Lower

func (r RangeFloat32) Lower() OptionalFloat32

Lower returns the lower bound.

func (RangeFloat32) MarshalJSON

func (r RangeFloat32) MarshalJSON() ([]byte, error)

MarshalJSON returns r marshaled as json.

func (*RangeFloat32) UnmarshalJSON

func (r *RangeFloat32) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals bytes into *r.

func (RangeFloat32) Upper

func (r RangeFloat32) Upper() OptionalFloat32

Upper returns the upper bound.

type RangeFloat64

type RangeFloat64 struct {
	// contains filtered or unexported fields
}

RangeFloat64 is an interval of float64 values.

func NewRangeFloat64

func NewRangeFloat64(
	lower, upper OptionalFloat64,
	incLower, incUpper bool,
) RangeFloat64

NewRangeFloat64 creates a new RangeFloat64 value.

func (RangeFloat64) Empty

func (r RangeFloat64) Empty() bool

Empty returns true if the range is empty.

func (RangeFloat64) IncLower

func (r RangeFloat64) IncLower() bool

IncLower returns true if the lower bound is inclusive.

func (RangeFloat64) IncUpper

func (r RangeFloat64) IncUpper() bool

IncUpper returns true if the upper bound is inclusive.

func (RangeFloat64) Lower

func (r RangeFloat64) Lower() OptionalFloat64

Lower returns the lower bound.

func (RangeFloat64) MarshalJSON

func (r RangeFloat64) MarshalJSON() ([]byte, error)

MarshalJSON returns r marshaled as json.

func (*RangeFloat64) UnmarshalJSON

func (r *RangeFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals bytes into *r.

func (RangeFloat64) Upper

func (r RangeFloat64) Upper() OptionalFloat64

Upper returns the upper bound.

type RangeInt32

type RangeInt32 struct {
	// contains filtered or unexported fields
}

RangeInt32 is an interval of int32 values.

func NewRangeInt32

func NewRangeInt32(
	lower, upper OptionalInt32,
	incLower, incUpper bool,
) RangeInt32

NewRangeInt32 creates a new RangeInt32 value.

func (RangeInt32) Empty

func (r RangeInt32) Empty() bool

Empty returns true if the range is empty.

func (RangeInt32) IncLower

func (r RangeInt32) IncLower() bool

IncLower returns true if the lower bound is inclusive.

func (RangeInt32) IncUpper

func (r RangeInt32) IncUpper() bool

IncUpper returns true if the upper bound is inclusive.

func (RangeInt32) Lower

func (r RangeInt32) Lower() OptionalInt32

Lower returns the lower bound.

func (RangeInt32) MarshalJSON

func (r RangeInt32) MarshalJSON() ([]byte, error)

MarshalJSON returns r marshaled as json.

func (*RangeInt32) UnmarshalJSON

func (r *RangeInt32) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals bytes into *r.

func (RangeInt32) Upper

func (r RangeInt32) Upper() OptionalInt32

Upper returns the upper bound.

type RangeInt64

type RangeInt64 struct {
	// contains filtered or unexported fields
}

RangeInt64 is an interval of int64 values.

func NewRangeInt64

func NewRangeInt64(
	lower, upper OptionalInt64,
	incLower, incUpper bool,
) RangeInt64

NewRangeInt64 creates a new RangeInt64 value.

func (RangeInt64) Empty

func (r RangeInt64) Empty() bool

Empty returns true if the range is empty.

func (RangeInt64) IncLower

func (r RangeInt64) IncLower() bool

IncLower returns true if the lower bound is inclusive.

func (RangeInt64) IncUpper

func (r RangeInt64) IncUpper() bool

IncUpper returns true if the upper bound is inclusive.

func (RangeInt64) Lower

func (r RangeInt64) Lower() OptionalInt64

Lower returns the lower bound.

func (RangeInt64) MarshalJSON

func (r RangeInt64) MarshalJSON() ([]byte, error)

MarshalJSON returns r marshaled as json.

func (*RangeInt64) UnmarshalJSON

func (r *RangeInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals bytes into *r.

func (RangeInt64) Upper

func (r RangeInt64) Upper() OptionalInt64

Upper returns the upper bound.

type RangeLocalDate

type RangeLocalDate struct {
	// contains filtered or unexported fields
}

RangeLocalDate is an interval of LocalDate values.

func NewRangeLocalDate

func NewRangeLocalDate(
	lower, upper OptionalLocalDate,
	incLower, incUpper bool,
) RangeLocalDate

NewRangeLocalDate creates a new RangeLocalDate value.

func (RangeLocalDate) Empty

func (r RangeLocalDate) Empty() bool

Empty returns true if the range is empty.

func (RangeLocalDate) IncLower

func (r RangeLocalDate) IncLower() bool

IncLower returns true if the lower bound is inclusive.

func (RangeLocalDate) IncUpper

func (r RangeLocalDate) IncUpper() bool

IncUpper returns true if the upper bound is inclusive.

func (RangeLocalDate) Lower

Lower returns the lower bound.

func (RangeLocalDate) MarshalJSON

func (r RangeLocalDate) MarshalJSON() ([]byte, error)

MarshalJSON returns r marshaled as json.

func (*RangeLocalDate) UnmarshalJSON

func (r *RangeLocalDate) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals bytes into *r.

func (RangeLocalDate) Upper

Upper returns the upper bound.

type RangeLocalDateTime

type RangeLocalDateTime struct {
	// contains filtered or unexported fields
}

RangeLocalDateTime is an interval of LocalDateTime values.

func NewRangeLocalDateTime

func NewRangeLocalDateTime(
	lower, upper OptionalLocalDateTime,
	incLower, incUpper bool,
) RangeLocalDateTime

NewRangeLocalDateTime creates a new RangeLocalDateTime value.

func (RangeLocalDateTime) Empty

func (r RangeLocalDateTime) Empty() bool

Empty returns true if the range is empty.

func (RangeLocalDateTime) IncLower

func (r RangeLocalDateTime) IncLower() bool

IncLower returns true if the lower bound is inclusive.

func (RangeLocalDateTime) IncUpper

func (r RangeLocalDateTime) IncUpper() bool

IncUpper returns true if the upper bound is inclusive.

func (RangeLocalDateTime) Lower

Lower returns the lower bound.

func (RangeLocalDateTime) MarshalJSON

func (r RangeLocalDateTime) MarshalJSON() ([]byte, error)

MarshalJSON returns r marshaled as json.

func (*RangeLocalDateTime) UnmarshalJSON

func (r *RangeLocalDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals bytes into *r.

func (RangeLocalDateTime) Upper

Upper returns the upper bound.

type RelativeDuration

type RelativeDuration struct {
	// contains filtered or unexported fields
}

RelativeDuration represents the elapsed time between two instants in a fuzzy human way.

func NewRelativeDuration

func NewRelativeDuration(
	months, days int32,
	microseconds int64,
) RelativeDuration

NewRelativeDuration returns a new RelativeDuration

func (RelativeDuration) MarshalText

func (rd RelativeDuration) MarshalText() ([]byte, error)

MarshalText returns rd marshaled as text.

func (RelativeDuration) String

func (rd RelativeDuration) String() string

func (*RelativeDuration) UnmarshalText

func (rd *RelativeDuration) UnmarshalText(b []byte) error

UnmarshalText unmarshals bytes into *rd.

type Tx

type Tx interface {
	Executor
}

Tx is a transaction. Use github.com/geldata/gel-go.Client.Tx to get a transaction.

type TxBlock

type TxBlock func(context.Context, Tx) error

TxBlock is work to be done in a transaction.

type UUID

type UUID [16]byte

UUID represents std::uuid, a universally unique identifier.

func ParseUUID

func ParseUUID(s string) (UUID, error)

ParseUUID parses s into a UUID or returns an error.

func (UUID) MarshalText

func (id UUID) MarshalText() ([]byte, error)

MarshalText returns the id as a byte string.

func (UUID) String

func (id UUID) String() string

func (*UUID) UnmarshalText

func (id *UUID) UnmarshalText(b []byte) error

UnmarshalText unmarshals the id from a string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL