queryhistory

package
v0.13.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: AGPL-3.0 Imports: 6 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

New creates a new QueryHistory object

func (*QueryHistory) Get

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

Get returns the full history

func (*QueryHistory) Peek added in v0.8.0

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 added in v0.8.0

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