octosql: github.com/cube2222/octosql Index | Files | Directories

package octosql

import "github.com/cube2222/octosql"

Index

Package Files

values.go values.pb.go variables.go

Variables

var ErrVariableNotFound = errors.New("variable not found")

func AreEqual Uses

func AreEqual(left, right Value) bool

octosql.AreEqual checks the equality of the given values, returning false if the types don't match.

type Comparison Uses

type Comparison int
const (
    LessThan    Comparison = -1
    Equal       Comparison = 0
    GreaterThan Comparison = 1
)

func Compare Uses

func Compare(x, y Value) (Comparison, error)

type Float Uses

type Float float64

type Int Uses

type Int int

type Object Uses

type Object struct {
    Fields               map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*Object) Descriptor Uses

func (*Object) Descriptor() ([]byte, []int)

func (*Object) GetFields Uses

func (m *Object) GetFields() map[string]*Value

func (*Object) ProtoMessage Uses

func (*Object) ProtoMessage()

func (*Object) Reset Uses

func (m *Object) Reset()

func (*Object) String Uses

func (m *Object) String() string

func (*Object) XXX_DiscardUnknown Uses

func (m *Object) XXX_DiscardUnknown()

func (*Object) XXX_Marshal Uses

func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Object) XXX_Merge Uses

func (m *Object) XXX_Merge(src proto.Message)

func (*Object) XXX_Size Uses

func (m *Object) XXX_Size() int

func (*Object) XXX_Unmarshal Uses

func (m *Object) XXX_Unmarshal(b []byte) error

type Phantom Uses

type Phantom struct{}

type Tuple Uses

type Tuple struct {
    Fields               []*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Tuple) Descriptor Uses

func (*Tuple) Descriptor() ([]byte, []int)

func (*Tuple) GetFields Uses

func (m *Tuple) GetFields() []*Value

func (*Tuple) ProtoMessage Uses

func (*Tuple) ProtoMessage()

func (*Tuple) Reset Uses

func (m *Tuple) Reset()

func (*Tuple) String Uses

func (m *Tuple) String() string

func (*Tuple) XXX_DiscardUnknown Uses

func (m *Tuple) XXX_DiscardUnknown()

func (*Tuple) XXX_Marshal Uses

func (m *Tuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tuple) XXX_Merge Uses

func (m *Tuple) XXX_Merge(src proto.Message)

func (*Tuple) XXX_Size Uses

func (m *Tuple) XXX_Size() int

func (*Tuple) XXX_Unmarshal Uses

func (m *Tuple) XXX_Unmarshal(b []byte) error

type Type Uses

type Type int
const (
    TypeZero Type = iota
    TypeNull
    TypePhantom
    TypeInt
    TypeFloat
    TypeBool
    TypeString
    TypeTime
    TypeDuration
    TypeTuple
    TypeObject
)

type Value Uses

type Value struct {
    // Types that are valid to be assigned to Value:
    //	*Value_Null
    //	*Value_Phantom
    //	*Value_Int
    //	*Value_Float
    //	*Value_Bool
    //	*Value_String_
    //	*Value_Time
    //	*Value_Duration
    //	*Value_Tuple
    //	*Value_Object
    Value                isValue_Value `protobuf_oneof:"value"`
    XXX_NoUnkeyedLiteral struct{}      `json:"-"`
    XXX_unrecognized     []byte        `json:"-"`
    XXX_sizecache        int32         `json:"-"`
}

func MakeBool Uses

func MakeBool(v bool) Value

func MakeDuration Uses

func MakeDuration(v time.Duration) Value

func MakeFloat Uses

func MakeFloat(v float64) Value

func MakeInt Uses

func MakeInt(v int) Value

func MakeNull Uses

func MakeNull() Value

func MakeObject Uses

func MakeObject(v map[string]Value) Value

func MakePhantom Uses

func MakePhantom() Value

func MakeString Uses

func MakeString(v string) Value

func MakeTime Uses

func MakeTime(v time.Time) Value

func MakeTuple Uses

func MakeTuple(v []Value) Value

func NormalizeType Uses

func NormalizeType(value interface{}) Value

NormalizeType brings various primitive types into the type we want them to be. All types coming out of data sources have to be already normalized this way.

func ZeroBool Uses

func ZeroBool() Value

func ZeroDuration Uses

func ZeroDuration() Value

func ZeroFloat Uses

func ZeroFloat() Value

func ZeroInt Uses

func ZeroInt() Value

func ZeroNull Uses

func ZeroNull() Value

func ZeroObject Uses

func ZeroObject() Value

func ZeroPhantom Uses

func ZeroPhantom() Value

func ZeroString Uses

func ZeroString() Value

func ZeroTime Uses

func ZeroTime() Value

func ZeroTuple Uses

func ZeroTuple() Value

func ZeroValue Uses

func ZeroValue() Value

func (Value) AsBool Uses

func (v Value) AsBool() bool

func (Value) AsDuration Uses

func (v Value) AsDuration() time.Duration

func (Value) AsFloat Uses

func (v Value) AsFloat() float64

func (Value) AsInt Uses

func (v Value) AsInt() int

func (Value) AsMap Uses

func (v Value) AsMap() map[string]Value

func (Value) AsSlice Uses

func (v Value) AsSlice() []Value

func (Value) AsString Uses

func (v Value) AsString() string

func (Value) AsTime Uses

func (v Value) AsTime() time.Time

func (*Value) Descriptor Uses

func (*Value) Descriptor() ([]byte, []int)

func (Value) Document Uses

func (v Value) Document() docs.Documentation

func (*Value) GetBool Uses

func (m *Value) GetBool() bool

func (*Value) GetDuration Uses

func (m *Value) GetDuration() *duration.Duration

func (*Value) GetFloat Uses

func (m *Value) GetFloat() float64

func (*Value) GetInt Uses

func (m *Value) GetInt() int64

func (*Value) GetNull Uses

func (m *Value) GetNull() bool

func (*Value) GetObject Uses

func (m *Value) GetObject() *Object

func (*Value) GetPhantom Uses

func (m *Value) GetPhantom() bool

func (*Value) GetString_ Uses

func (m *Value) GetString_() string

func (*Value) GetTime Uses

func (m *Value) GetTime() *timestamp.Timestamp

func (*Value) GetTuple Uses

func (m *Value) GetTuple() *Tuple

func (Value) GetType Uses

func (v Value) GetType() Type

Można na tych Value pod spodem zdefiniowac GetType i użyć wirtualnych metod, a nie type switch

func (*Value) GetValue Uses

func (m *Value) GetValue() isValue_Value

func (*Value) ProtoMessage Uses

func (*Value) ProtoMessage()

func (*Value) Reset Uses

func (m *Value) Reset()

func (Value) Show Uses

func (v Value) Show() string

func (*Value) String Uses

func (m *Value) String() string

func (Value) ToRawValue Uses

func (v Value) ToRawValue() interface{}

func (*Value) XXX_DiscardUnknown Uses

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal Uses

func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Value) XXX_Merge Uses

func (m *Value) XXX_Merge(src proto.Message)

func (*Value) XXX_OneofWrappers Uses

func (*Value) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Value) XXX_Size Uses

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal Uses

func (m *Value) XXX_Unmarshal(b []byte) error

type Value_Bool Uses

type Value_Bool struct {
    Bool bool `protobuf:"varint,5,opt,name=bool,proto3,oneof"`
}

type Value_Duration Uses

type Value_Duration struct {
    Duration *duration.Duration `protobuf:"bytes,8,opt,name=duration,proto3,oneof"`
}

type Value_Float Uses

type Value_Float struct {
    Float float64 `protobuf:"fixed64,4,opt,name=float,proto3,oneof"`
}

type Value_Int Uses

type Value_Int struct {
    Int int64 `protobuf:"varint,3,opt,name=int,proto3,oneof"`
}

type Value_Null Uses

type Value_Null struct {
    Null bool `protobuf:"varint,1,opt,name=null,proto3,oneof"`
}

type Value_Object Uses

type Value_Object struct {
    Object *Object `protobuf:"bytes,10,opt,name=object,proto3,oneof"`
}

type Value_Phantom Uses

type Value_Phantom struct {
    Phantom bool `protobuf:"varint,2,opt,name=phantom,proto3,oneof"`
}

type Value_String_ Uses

type Value_String_ struct {
    String_ string `protobuf:"bytes,6,opt,name=string,proto3,oneof"`
}

type Value_Time Uses

type Value_Time struct {
    Time *timestamp.Timestamp `protobuf:"bytes,7,opt,name=time,proto3,oneof"`
}

type Value_Tuple Uses

type Value_Tuple struct {
    Tuple *Tuple `protobuf:"bytes,9,opt,name=tuple,proto3,oneof"`
}

type VariableName Uses

type VariableName string

func NewVariableName Uses

func NewVariableName(varname string) VariableName

func (*VariableName) Name Uses

func (vn *VariableName) Name() string

func (*VariableName) Source Uses

func (vn *VariableName) Source() string

func (*VariableName) String Uses

func (vn *VariableName) String() string

type Variables Uses

type Variables map[VariableName]Value

func NewVariables Uses

func NewVariables(variables map[VariableName]Value) Variables

func NoVariables Uses

func NoVariables() Variables

func (Variables) Get Uses

func (vs Variables) Get(k VariableName) (Value, error)

func (Variables) MergeWith Uses

func (vs Variables) MergeWith(other Variables) (Variables, error)

Directories

PathSynopsis
app
cmd/octosql
config
docs
execution
execution/aggregates
execution/aggregates/docgen
execution/functions
execution/functions/docgen
execution/tvf
execution/tvf/docgen
logical
output
output/csv
output/json
output/table
parser
parser/sqlparser
parser/sqlparser/dependency/bytes2
parser/sqlparser/dependency/hackPackage hack gives you some efficient functionality at the cost of breaking some Go rules.
parser/sqlparser/dependency/queryPackage query is a generated protocol buffer package.
parser/sqlparser/dependency/sqltypesPackage sqltypes implements interfaces and types that represent SQL values.
physical
physical/matcher
physical/metadata
physical/optimizer
serialization
serialization/internal
storage/csv
storage/excel
storage/json
storage/mysql
storage/postgres
storage/redis

Package octosql imports 12 packages (graph) and is imported by 17 packages. Updated 2019-12-10. Refresh now. Tools for package owners.