commands

package
v0.0.0-...-9006f74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteStatement

func ExecuteStatement(statement *Statement)

ExecuteStatement prints the execution of a given command, based on the statement type.

Types

type MetaCommandResult

type MetaCommandResult struct {
	IsSuccesful bool
}

MetaCommandResult represents a command result.

func ExecuteMetaCommand

func ExecuteMetaCommand(ib *buffer.InputBuffer) MetaCommandResult

ExecuteMetaCommand checks for a command and executes it.

func NewSuccessfulCommand

func NewSuccessfulCommand() MetaCommandResult

NewUnsuccesfulCommand returns an instance of an unsuccessful MetaCommandResult.

func NewUnsuccesfulCommand

func NewUnsuccesfulCommand() MetaCommandResult

NewUnsuccesfulCommand returns an instance of a successful MetaCommandResult.

type PrepareResult

type PrepareResult struct {
	IsSuccesful bool
}

PrepareResult represents a command result.

func NewSuccessfulPrepare

func NewSuccessfulPrepare() PrepareResult

NewUnsuccesfulCommand returns an instance of an unsuccessful PrepareResults.

func NewUnsuccesfulPrepare

func NewUnsuccesfulPrepare() PrepareResult

NewUnsuccesfulCommand returns an instance of a successful PrepareResult.

func PrepareStatement

func PrepareStatement(ib *buffer.InputBuffer, statement *Statement, table *models.Table) PrepareResult

PrepareStatement based on the command input given, returns a PrepareResult.

type Statement

type Statement struct {
	Type string
}

Statement represents a command result.

func NewInsertStatement

func NewInsertStatement() *Statement

NewInsertStatement returns a pointer to a Statement whose type is insert.

func NewSelectStatement

func NewSelectStatement() *Statement

NewInsertStatement returns a pointer to a Statement whose type is select.

func NewStatement

func NewStatement() *Statement

NewStatement returns a pointer to a Statement whose type is null.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL