Documentation
¶
Overview ¶
Package engine executes logic operations on sequences.
Index ¶
- Constants
- func CastValueInterface(v ValueInterface)
- type Column
- type ColumnDoesNotExistError
- type DbEngine
- type IntegerValue
- type InvalidNumberOfParametersError
- type InvalidValueTypeError
- type NullValue
- type Rows
- type StringValue
- type SupportedTypes
- type Table
- type TableAlreadyExistsError
- type TableDoesNotExistError
- type Tables
- type UnsupportedCommandTypeFromParserError
- type UnsupportedConditionalTokenError
- type UnsupportedExpressionTypeError
- type UnsupportedOperationTokenError
- type UnsupportedValueType
- type ValueInterface
Constants ¶
const ( IntType = iota StringType NullType )
Variables ¶
This section is empty.
Functions ¶
func CastValueInterface ¶ added in v1.0.0
func CastValueInterface(v ValueInterface)
HandleValue - Function to take an instance of ValueInterface and cast to a specific implementation
Types ¶
type Column ¶
type Column struct { Name string Type token.Token Values []ValueInterface }
Column - part of the Table containing name of Column and values in it
type ColumnDoesNotExistError ¶ added in v1.0.0
type ColumnDoesNotExistError struct {
// contains filtered or unexported fields
}
ColumnDoesNotExistError - error thrown when user tries to make operation on un-existing column
func (*ColumnDoesNotExistError) Error ¶ added in v1.0.0
func (m *ColumnDoesNotExistError) Error() string
type IntegerValue ¶ added in v0.0.2
type IntegerValue struct {
Value int
}
IntegerValue - Implementation of ValueInterface that is containing integer values
func (IntegerValue) GetType ¶ added in v0.0.2
func (value IntegerValue) GetType() SupportedTypes
GetType implementations
func (IntegerValue) IsEqual ¶ added in v0.0.2
func (value IntegerValue) IsEqual(valueInterface ValueInterface) bool
IsEqual implementations
func (IntegerValue) ToString ¶ added in v0.0.2
func (value IntegerValue) ToString() string
ToString implementations
type InvalidNumberOfParametersError ¶ added in v1.0.0
type InvalidNumberOfParametersError struct {
// contains filtered or unexported fields
}
InvalidNumberOfParametersError - error thrown when user provides invalid number of expected parameters (ex. fewer values in insert than defined )
func (*InvalidNumberOfParametersError) Error ¶ added in v1.0.0
func (m *InvalidNumberOfParametersError) Error() string
type InvalidValueTypeError ¶ added in v1.0.0
type InvalidValueTypeError struct {
// contains filtered or unexported fields
}
InvalidValueTypeError - error thrown when user provides value of different type than expected
func (*InvalidValueTypeError) Error ¶ added in v1.0.0
func (m *InvalidValueTypeError) Error() string
type NullValue ¶ added in v1.0.0
type NullValue struct { }
NullValue - Implementation of ValueInterface that is containing null
func (NullValue) GetType ¶ added in v1.0.0
func (value NullValue) GetType() SupportedTypes
func (NullValue) IsEqual ¶ added in v1.0.0
func (value NullValue) IsEqual(valueInterface ValueInterface) bool
type Rows ¶ added in v1.0.0
type Rows struct {
// contains filtered or unexported fields
}
Rows - Contain rows that store values, alternative to Table, some operations are easier
func MapTableToRows ¶ added in v1.0.0
MapTableToRows - transform Table struct into Rows
type StringValue ¶ added in v0.0.2
type StringValue struct {
Value string
}
StringValue - Implementation of ValueInterface that is containing string values
func (StringValue) GetType ¶ added in v0.0.2
func (value StringValue) GetType() SupportedTypes
func (StringValue) IsEqual ¶ added in v0.0.2
func (value StringValue) IsEqual(valueInterface ValueInterface) bool
func (StringValue) ToString ¶ added in v0.0.2
func (value StringValue) ToString() string
type SupportedTypes ¶ added in v0.0.2
type SupportedTypes int
type Table ¶ added in v0.0.2
type Table struct {
Columns []*Column
}
Table - Contain Columns that store values in engine
type TableAlreadyExistsError ¶ added in v1.0.0
type TableAlreadyExistsError struct {
// contains filtered or unexported fields
}
TableAlreadyExistsError - error thrown when user tries to create table using name that already exists in database
func (*TableAlreadyExistsError) Error ¶ added in v1.0.0
func (m *TableAlreadyExistsError) Error() string
type TableDoesNotExistError ¶ added in v1.0.0
type TableDoesNotExistError struct {
// contains filtered or unexported fields
}
TableDoesNotExistError - error thrown when user tries to make operation on un-existing table
func (*TableDoesNotExistError) Error ¶ added in v1.0.0
func (m *TableDoesNotExistError) Error() string
type UnsupportedCommandTypeFromParserError ¶ added in v1.0.0
type UnsupportedCommandTypeFromParserError struct {
// contains filtered or unexported fields
}
UnsupportedCommandTypeFromParserError - error thrown when engine found unsupported command from parser
func (*UnsupportedCommandTypeFromParserError) Error ¶ added in v1.0.0
func (m *UnsupportedCommandTypeFromParserError) Error() string
type UnsupportedConditionalTokenError ¶ added in v1.0.0
type UnsupportedConditionalTokenError struct {
// contains filtered or unexported fields
}
UnsupportedConditionalTokenError - error thrown when engine found unsupported conditional token inside expression (supported are: EQUAL, NOT)
func (*UnsupportedConditionalTokenError) Error ¶ added in v1.0.0
func (m *UnsupportedConditionalTokenError) Error() string
type UnsupportedExpressionTypeError ¶ added in v1.0.0
type UnsupportedExpressionTypeError struct {
// contains filtered or unexported fields
}
UnsupportedExpressionTypeError - error thrown when engine found unsupported expression type
func (*UnsupportedExpressionTypeError) Error ¶ added in v1.0.0
func (m *UnsupportedExpressionTypeError) Error() string
type UnsupportedOperationTokenError ¶ added in v1.0.0
type UnsupportedOperationTokenError struct {
// contains filtered or unexported fields
}
UnsupportedOperationTokenError - error thrown when engine found unsupported operation token (supported are: AND, OR)
func (*UnsupportedOperationTokenError) Error ¶ added in v1.0.0
func (m *UnsupportedOperationTokenError) Error() string
type UnsupportedValueType ¶ added in v1.0.0
type UnsupportedValueType struct {
// contains filtered or unexported fields
}
UnsupportedValueType - error thrown when engine found unsupported data type to be stored inside the columns
func (*UnsupportedValueType) Error ¶ added in v1.0.0
func (m *UnsupportedValueType) Error() string
type ValueInterface ¶ added in v0.0.2
type ValueInterface interface { ToString() string GetType() SupportedTypes IsEqual(valueInterface ValueInterface) bool // contains filtered or unexported methods }
ValueInterface - Represent all supported types of data that can be inserted into Table