queryhistory

package
v0.23.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryHistory

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

QueryHistory :: struct for working with history in the interactive mode

func New

func New() (*QueryHistory, error)

New creates a new QueryHistory object

func (*QueryHistory) Get

func (q *QueryHistory) Get() []string

Get returns the full history

func (*QueryHistory) Peek

func (q *QueryHistory) Peek() *string

Peek returns the last element of the history stack. returns nil if there is no history

func (*QueryHistory) Persist

func (q *QueryHistory) Persist() error

Persist writes the history to the filesystem

func (*QueryHistory) Push

func (q *QueryHistory) Push(query string)

Push adds a string to the history queue trimming to maxHistorySize if necessary

Jump to

Keyboard shortcuts

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