Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDuplicateNames = errors.New("voodoo/dataspace: conflicting names within dataspace")
)
Errors returned during dataspace parsing/validation
View Source
var (
ErrNoKeyExists = errors.New("voodoo/keyvalue: no key exists")
)
Functions ¶
Types ¶
type Column ¶
type Column struct { Name string `json:"name"` Type ColumnType `json:"type"` PrimaryKey bool `json:"primary_key,omitempty"` }
A Column is a column of a table
type ColumnType ¶
type ColumnType string
A ColumnType is the datatype of a column
var ( Float64 ColumnType = "float64" Int64 ColumnType = "int64" Timezone ColumnType = "timezone" Timestamp ColumnType = "timestamp" Date ColumnType = "date" Text ColumnType = "text" Bool ColumnType = "bool" )
type Dataspace ¶
type Dataspace struct { Name string `json:"name"` Tables []Table `json:"tables"` Indexes []Index `json:"indexes"` }
Dataspace is the overall db metadata
type Index ¶
type Index struct {
Name string
}
An Index is a non-primary-key index used in Query Planning and evaluation.
type Iterator ¶
type Iterator interface { // get the value at the iterator location Val() []byte // get the current key Key() []byte // move to the first key First() bool // move to the last key Last() bool // move to the next key Next() bool // move to the previous key Prev() bool }
An Iterator is used to traverse the keyspace
type KeyValue ¶
type KeyValue interface { Get(key []byte) ([]byte, error) Set(key []byte, val []byte) error // Walk is used to traverse parts of the keyspace Walk(prefix []byte) (Iterator, error) }
KeyValue is the primitive interface on top of which SQL is mapped.
/columnspace/pkey = row
type ResultSet ¶
type ResultSet struct { // types of each column, in order ColumnTypes []ColumnType // names of each column in the resultset ColumnNames []string // all rows returned Rows []Row // an error, if any Err error }
A ResultSet is returned from a query
type Row ¶
type Row []interface{}
func (*Row) MarshalBinary ¶
MarshalBinary encodes the row
func (*Row) UnmarshalBinary ¶
UnmarshalBinary decodes the given row from a byte array
Source Files ¶
Click to show internal directories.
Click to hide internal directories.