cqtypes

package
v0.13.19 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MPL-2.0, MIT Imports: 13 Imported by: 0

README

CloudQuery Type System

This directory is heavily based on jackc/pgtype and modified per CQ needs and thus fall under the original MIT license and copyright.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayDimension

type ArrayDimension struct {
	Length     int32
	LowerBound int32
}

type Bool

type Bool struct {
	Bool   bool
	Status Status
}

func (*Bool) Equal

func (dst *Bool) Equal(src CQType) bool

func (Bool) Get

func (dst Bool) Get() interface{}

func (*Bool) Set

func (dst *Bool) Set(src interface{}) error

func (*Bool) String

func (dst *Bool) String() string

type Bytea

type Bytea struct {
	Bytes  []byte
	Status Status
}

func (*Bytea) Equal

func (dst *Bytea) Equal(src CQType) bool

func (Bytea) Get

func (dst Bytea) Get() interface{}

func (*Bytea) Set

func (dst *Bytea) Set(src interface{}) error

func (*Bytea) String

func (dst *Bytea) String() string

type CIDR

type CIDR Inet

func (*CIDR) Equal

func (dst *CIDR) Equal(src CQType) bool

func (CIDR) Get

func (dst CIDR) Get() interface{}

func (*CIDR) Set

func (dst *CIDR) Set(src interface{}) error

func (*CIDR) String

func (dst *CIDR) String() string

type CIDRArray

type CIDRArray struct {
	Elements   []CIDR
	Dimensions []ArrayDimension
	Status     Status
}

func (*CIDRArray) Equal

func (dst *CIDRArray) Equal(src CQType) bool

func (CIDRArray) Get

func (dst CIDRArray) Get() interface{}

func (*CIDRArray) Set

func (dst *CIDRArray) Set(src interface{}) error

func (*CIDRArray) String

func (dst *CIDRArray) String() string

type CQType

type CQType interface {
	Set(v interface{}) error
	Get() interface{}
	String() string
	Equal(CQType) bool
}

type CQTypes

type CQTypes []CQType

func (CQTypes) Equal

func (c CQTypes) Equal(other CQTypes) bool

func (CQTypes) Len

func (c CQTypes) Len() int

func (CQTypes) MarshalJSON

func (c CQTypes) MarshalJSON() ([]byte, error)

func (CQTypes) String

func (c CQTypes) String() string

func (*CQTypes) UnmarshalJSON

func (c *CQTypes) UnmarshalJSON(b []byte) error

type Float8

type Float8 struct {
	Float  float64
	Status Status
}

func (*Float8) Equal

func (dst *Float8) Equal(src CQType) bool

func (Float8) Get

func (dst Float8) Get() interface{}

func (*Float8) Set

func (dst *Float8) Set(src interface{}) error

func (*Float8) String

func (dst *Float8) String() string

type Inet

type Inet struct {
	IPNet  *net.IPNet
	Status Status
}

Inet represents both inet and cidr PostgreSQL types.

func (*Inet) Equal

func (dst *Inet) Equal(src CQType) bool

func (Inet) Get

func (dst Inet) Get() interface{}

func (*Inet) Set

func (dst *Inet) Set(src interface{}) error

func (*Inet) String

func (dst *Inet) String() string

type InetArray

type InetArray struct {
	Elements   []Inet
	Dimensions []ArrayDimension
	Status     Status
}

func (*InetArray) Equal

func (dst *InetArray) Equal(src CQType) bool

func (InetArray) Get

func (dst InetArray) Get() interface{}

func (*InetArray) Set

func (dst *InetArray) Set(src interface{}) error

func (*InetArray) String

func (dst *InetArray) String() string

type InfinityModifier

type InfinityModifier int8
const (
	Infinity         InfinityModifier = 1
	None             InfinityModifier = 0
	NegativeInfinity InfinityModifier = -Infinity
)

type Int8

type Int8 struct {
	Int    int64
	Status Status
}

func (*Int8) Equal

func (dst *Int8) Equal(src CQType) bool

func (Int8) Get

func (dst Int8) Get() interface{}

func (*Int8) Set

func (dst *Int8) Set(src interface{}) error

func (*Int8) String

func (dst *Int8) String() string

type Int8Array

type Int8Array struct {
	Elements   []Int8
	Dimensions []ArrayDimension
	Status     Status
}

func (*Int8Array) Equal

func (dst *Int8Array) Equal(src CQType) bool

func (Int8Array) Get

func (dst Int8Array) Get() interface{}

func (*Int8Array) Set

func (dst *Int8Array) Set(src interface{}) error

func (*Int8Array) String

func (dst *Int8Array) String() string

type JSON

type JSON struct {
	Bytes  []byte
	Status Status
}

func (*JSON) Equal

func (dst *JSON) Equal(src CQType) bool

func (JSON) Get

func (dst JSON) Get() interface{}

func (*JSON) Set

func (dst *JSON) Set(src interface{}) error

func (*JSON) String

func (dst *JSON) String() string

type Macaddr

type Macaddr struct {
	Addr   net.HardwareAddr
	Status Status
}

func (*Macaddr) Equal

func (dst *Macaddr) Equal(src CQType) bool

func (Macaddr) Get

func (dst Macaddr) Get() interface{}

func (*Macaddr) Set

func (dst *Macaddr) Set(src interface{}) error

func (*Macaddr) String

func (dst *Macaddr) String() string

type MacaddrArray

type MacaddrArray struct {
	Elements   []Macaddr
	Dimensions []ArrayDimension
	Status     Status
}

func (*MacaddrArray) Equal

func (dst *MacaddrArray) Equal(src CQType) bool

func (MacaddrArray) Get

func (dst MacaddrArray) Get() interface{}

func (*MacaddrArray) Set

func (dst *MacaddrArray) Set(src interface{}) error

func (*MacaddrArray) String

func (dst *MacaddrArray) String() string

type Status

type Status byte
const (
	Undefined Status = iota
	Null
	Present
)

type Text

type Text struct {
	Str    string
	Status Status
}

func (*Text) Equal

func (dst *Text) Equal(src CQType) bool

func (Text) Get

func (dst Text) Get() interface{}

func (*Text) Set

func (dst *Text) Set(src interface{}) error

func (*Text) String

func (dst *Text) String() string

type TextArray

type TextArray struct {
	Elements   []Text
	Dimensions []ArrayDimension
	Status     Status
}

func (*TextArray) Equal

func (dst *TextArray) Equal(src CQType) bool

func (TextArray) Get

func (dst TextArray) Get() interface{}

func (*TextArray) Set

func (dst *TextArray) Set(src interface{}) error

func (*TextArray) String

func (dst *TextArray) String() string

type Timestamptz

type Timestamptz struct {
	Time             time.Time
	Status           Status
	InfinityModifier InfinityModifier
}

func (*Timestamptz) DecodeText

func (dst *Timestamptz) DecodeText(src []byte) error

func (*Timestamptz) Equal

func (dst *Timestamptz) Equal(src CQType) bool

func (Timestamptz) Get

func (dst Timestamptz) Get() interface{}

func (*Timestamptz) Set

func (dst *Timestamptz) Set(src interface{}) error

func (*Timestamptz) String

func (dst *Timestamptz) String() string

type UUID

type UUID struct {
	Bytes  [16]byte
	Status Status
}

func (*UUID) Equal

func (dst *UUID) Equal(src CQType) bool

func (UUID) Get

func (dst UUID) Get() interface{}

func (*UUID) Set

func (dst *UUID) Set(src interface{}) error

func (*UUID) String

func (dst *UUID) String() string

type UUIDArray

type UUIDArray struct {
	Elements   []UUID
	Dimensions []ArrayDimension
	Status     Status
}

func (*UUIDArray) Equal

func (dst *UUIDArray) Equal(src CQType) bool

func (UUIDArray) Get

func (dst UUIDArray) Get() interface{}

func (*UUIDArray) Set

func (dst *UUIDArray) Set(src interface{}) error

func (*UUIDArray) String

func (dst *UUIDArray) String() string

Jump to

Keyboard shortcuts

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