Documentation
¶
Overview ¶
Package engine executes logic operations on sequences.
Index ¶
- Constants
- type Column
- type DbEngine
- func (engine *DbEngine) CreateTable(command *ast.CreateCommand)
- func (engine *DbEngine) DeleteFromTable(deleteCommand *ast.DeleteCommand, whereCommand *ast.WhereCommand)
- func (engine *DbEngine) InsertIntoTable(command *ast.InsertCommand)
- func (engine *DbEngine) SelectFromTable(command *ast.SelectCommand) *Table
- func (engine *DbEngine) SelectFromTableWithOrderBy(selectCommand *ast.SelectCommand, orderByCommand *ast.OrderByCommand) *Table
- func (engine *DbEngine) SelectFromTableWithWhere(selectCommand *ast.SelectCommand, whereCommand *ast.WhereCommand) *Table
- func (engine *DbEngine) SelectFromTableWithWhereAndOrderBy(selectCommand *ast.SelectCommand, whereCommand *ast.WhereCommand, ...) *Table
- type IntegerValue
- type StringValue
- type SupportedTypes
- type Table
- type ValueInterface
Constants ¶
const ( IntType = iota StringType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 DbEngine ¶
func (*DbEngine) CreateTable ¶
func (engine *DbEngine) CreateTable(command *ast.CreateCommand)
CreateTable - initialize new table in engine with specified name
func (*DbEngine) DeleteFromTable ¶ added in v0.0.2
func (engine *DbEngine) DeleteFromTable(deleteCommand *ast.DeleteCommand, whereCommand *ast.WhereCommand)
DeleteFromTable - Delete all rows of data from table that match given condition
func (*DbEngine) InsertIntoTable ¶
func (engine *DbEngine) InsertIntoTable(command *ast.InsertCommand)
InsertIntoTable - Insert row of values into the table
func (*DbEngine) SelectFromTable ¶
func (engine *DbEngine) SelectFromTable(command *ast.SelectCommand) *Table
SelectFromTable - Return Table containing all values requested by SelectCommand
func (*DbEngine) SelectFromTableWithOrderBy ¶ added in v0.0.2
func (engine *DbEngine) SelectFromTableWithOrderBy(selectCommand *ast.SelectCommand, orderByCommand *ast.OrderByCommand) *Table
SelectFromTableWithOrderBy - Return Table containing all values requested by SelectCommand and sorted by OrderByCommand
func (*DbEngine) SelectFromTableWithWhere ¶ added in v0.0.2
func (engine *DbEngine) SelectFromTableWithWhere(selectCommand *ast.SelectCommand, whereCommand *ast.WhereCommand) *Table
SelectFromTableWithWhere - Return Table containing all values requested by SelectCommand and filtered by WhereCommand
func (*DbEngine) SelectFromTableWithWhereAndOrderBy ¶ added in v0.0.2
func (engine *DbEngine) SelectFromTableWithWhereAndOrderBy(selectCommand *ast.SelectCommand, whereCommand *ast.WhereCommand, orderByCommand *ast.OrderByCommand) *Table
SelectFromTableWithWhereAndOrderBy - Return Table containing all values requested by SelectCommand, filtered by WhereCommand and sorted by OrderByCommand
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 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 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