query

package
v0.0.0-...-51d5a38 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownCommand = errors.New("unknown command")
	ErrInvalidQuery   = errors.New("invalid query")
)

Functions

This section is empty.

Types

type Command

type Command string
const (
	CommandGET Command = "GET"
	CommandSET Command = "SET"
	CommandDEL Command = "DEL"
)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(log *slog.Logger, wal *wal.WAL, e engine.Engine) *Handler

func (*Handler) HandleQuery

func (h *Handler) HandleQuery(ctx context.Context, queryStr string) string

type Query

type Query struct {
	// contains filtered or unexported fields
}

func NewQuery

func NewQuery(c Command, args []string) *Query

func ParseQueryStr

func ParseQueryStr(queryStr string) (*Query, error)

func (*Query) Arg

func (q *Query) Arg(i int) string

func (*Query) Args

func (q *Query) Args() []string

func (*Query) Command

func (q *Query) Command() Command

Jump to

Keyboard shortcuts

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