Documentation ¶
Index ¶
- Variables
- type SqlVm
- func (m *SqlVm) Execute(writeContext datasource.ContextWriter, readContext datasource.ContextReader) (err error)
- func (m *SqlVm) ExecuteDelete(writeContext datasource.ContextWriter, readContext datasource.ContextReader) (err error)
- func (m *SqlVm) ExecuteInsert(writeContext datasource.RowWriter) (err error)
- func (m *SqlVm) ExecuteSelect(writeContext datasource.ContextWriter, readContext datasource.ContextReader) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SqlEvalError = fmt.Errorf("Could not evaluate sql statement")
)
Functions ¶
This section is empty.
Types ¶
type SqlVm ¶
type SqlVm struct { Statement expr.SqlStatement Keyword lex.TokenType // contains filtered or unexported fields }
SqlVm vm is a vm for parsing, evaluating a
func (*SqlVm) Execute ¶
func (m *SqlVm) Execute(writeContext datasource.ContextWriter, readContext datasource.ContextReader) (err error)
Execute applies a parse expression to the specified context's
writeContext in the case of sql query is similar to a recordset for selects, or for delete, insert, update it is like the storage layer
func (*SqlVm) ExecuteDelete ¶
func (m *SqlVm) ExecuteDelete(writeContext datasource.ContextWriter, readContext datasource.ContextReader) (err error)
func (*SqlVm) ExecuteInsert ¶
func (m *SqlVm) ExecuteInsert(writeContext datasource.RowWriter) (err error)
func (*SqlVm) ExecuteSelect ¶
func (m *SqlVm) ExecuteSelect(writeContext datasource.ContextWriter, readContext datasource.ContextReader) (err error)
Execute applies a dml sql select expression to the specified context's
writeContext in the case of sql query is similar to a recordset for selects, or for delete, insert, update it is like the storage layer
Click to show internal directories.
Click to hide internal directories.