sql

package
v0.0.0-...-a2c0b89 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Unlicense Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DateLayout = "2006-01-02"

DateLayout is the layout of the MySQL date format in the representation Go understands.

View Source
const DatetimeLayout = "2006-01-02 15:04:05"

DatetimeLayout is the layout of the MySQL date format in the representation Go understands.

View Source
const (
	// QueryKey to access query in the context.
	QueryKey key = iota
)
View Source
const TimestampLayout = "2006-01-02 15:04:05"

TimestampLayout is the formatting string with the layout of the timestamp using the format of Go "time" package.

Variables

View Source
var (
	// ErrInvalidType is thrown when there is an unexpected type at some part of
	// the execution tree.
	ErrInvalidType = errors.NewKind("invalid type: %s")

	// ErrTableAlreadyExists is thrown when someone tries to create a
	// table with a name of an existing one
	ErrTableAlreadyExists = errors.NewKind("table with name %s already exists")

	// ErrTableNotFound is returned when the table is not available from the
	// current scope.
	ErrTableNotFound = errors.NewKind("table not found: %s")

	//ErrUnexpectedRowLength is thrown when the obtained row has more columns than the schema
	ErrUnexpectedRowLength = errors.NewKind("expected %d values, got %d")

	// ErrInvalidChildrenNumber is returned when the WithChildren method of a
	// node or expression is called with an invalid number of arguments.
	ErrInvalidChildrenNumber = errors.NewKind("%T: invalid children number, got %d, expected %d")

	// ErrDeleteRowNotFound ????
	ErrDeleteRowNotFound = errors.NewKind("row was not found when attempting to delete").New()
)
View Source
var (
	// ErrTypeNotSupported is thrown when a specific type is not supported
	ErrTypeNotSupported = errors.NewKind("Type not supported: %s")

	// ErrUnexpectedType is thrown when a received type is not the expected
	ErrUnexpectedType = errors.NewKind("value at %d has unexpected type: %s")

	// ErrConvertingToTime is thrown when a value cannot be converted to a Time
	ErrConvertingToTime = errors.NewKind("value %q can't be converted to time.Time")

	// ErrCharTruncation is thrown when a Char value is textually longer than the destination capacity
	ErrCharTruncation = errors.NewKind("string value of %q is longer than destination capacity %d")

	// ErrVarCharTruncation is thrown when a VarChar value is textually longer than the destination capacity
	ErrVarCharTruncation = errors.NewKind("string value of %q is longer than destination capacity %d")

	// ErrValueNotNil is thrown when a value that was expected to be nil, is not
	ErrValueNotNil = errors.NewKind("value not nil: %#v")

	// ErrNotTuple is returned when the value is not a tuple.
	ErrNotTuple = errors.NewKind("value of type %T is not a tuple")

	// ErrInvalidColumnNumber is returned when a tuple has an invalid number of
	// arguments.
	ErrInvalidColumnNumber = errors.NewKind("tuple should contain %d column(s), but has %d")

	// ErrNotArray is returned when the value is not an array.
	ErrNotArray = errors.NewKind("value of type %T is not an array")

	// ErrConvertToSQL is returned when Convert failed.
	// It makes an error less verbose comparingto what spf13/cast returns.
	ErrConvertToSQL = errors.NewKind("incompatible conversion to SQL type: %s")
)
View Source
var (
	// Null represents the null type.
	Null nullT

	// Int8 is an integer of 8 bits
	Int8 = numberT{/* contains filtered or unexported fields */}
	// Uint8 is an unsigned integer of 8 bits
	Uint8 = numberT{/* contains filtered or unexported fields */}
	// Int16 is an integer of 16 bits
	Int16 = numberT{/* contains filtered or unexported fields */}
	// Uint16 is an unsigned integer of 16 bits
	Uint16 = numberT{/* contains filtered or unexported fields */}
	// Int24 is an integer of 24 bits.
	Int24 = numberT{/* contains filtered or unexported fields */}
	// Uint24 is an unsigned integer of 24 bits.
	Uint24 = numberT{/* contains filtered or unexported fields */}
	// Int32 is an integer of 32 bits.
	Int32 = numberT{/* contains filtered or unexported fields */}
	// Uint32 is an unsigned integer of 32 bits.
	Uint32 = numberT{/* contains filtered or unexported fields */}
	// Int64 is an integer of 64 bytes.
	Int64 = numberT{/* contains filtered or unexported fields */}
	// Uint64 is an unsigned integer of 64 bits.
	Uint64 = numberT{/* contains filtered or unexported fields */}
	// Float32 is a floating point number of 32 bits.
	Float32 = numberT{/* contains filtered or unexported fields */}
	// Float64 is a floating point number of 64 bits.
	Float64 = numberT{/* contains filtered or unexported fields */}

	// Timestamp is an UNIX timestamp.
	Timestamp timestampT
	// Date is a date with day, month and year.
	Date dateT
	// Datetime is a date and a time
	Datetime datetimeT
	// Text is a string type.
	Text textT
	// Boolean is a boolean type.
	Boolean booleanT
	// JSON is a type that holds any valid JSON object.
	JSON jsonT
	// Blob is a type that holds a chunk of binary data.
	Blob blobT
)
View Source
var ErrDatabaseNotFound = errors.NewKind("database not found: %s")

ErrDatabaseNotFound is thrown when a database is not found

View Source
var ErrNoMemoryAvailable = errors.NewKind("no memory available")

ErrNoMemoryAvailable is returned when there is no more available memory.

View Source
var ErrPidAlreadyUsed = errors.NewKind("pid %d is already in use")

ErrPidAlreadyUsed is returned when the pid is already registered.

View Source
var TimestampLayouts = []string{
	"2006-01-02",
	time.RFC3339,
	"20060102150405",
	"20060102",
}

TimestampLayouts hold extra timestamps allowed for parsing. It does not have all the layouts supported by mysql. Missing are two digit year versions of common cases and dates that use non common separators.

https://github.com/MariaDB/server/blob/mysql-5.5.36/sql-common/my_time.c#L124

Functions

func DefaultSessionConfig

func DefaultSessionConfig() map[string]TypedValue

DefaultSessionConfig returns default values for session variables

func HasAvailableMemory

func HasAvailableMemory(r Reporter) bool

HasAvailableMemory reports whether more memory is available to the program if it hasn't reached the max memory limit.

func HasDefaultValue

func HasDefaultValue(s Session, key string) (bool, interface{})

HasDefaultValue checks if session variable value is the default one.

func IsArray

func IsArray(t Type) bool

IsArray returns whether the given type is an array.

func IsChar

func IsChar(t Type) bool

IsChar checks if t is a Char type.

func IsDecimal

func IsDecimal(t Type) bool

IsDecimal checks if t is decimal type.

func IsInteger

func IsInteger(t Type) bool

IsInteger checks if t is a (U)Int32/64 type.

func IsNumber

func IsNumber(t Type) bool

IsNumber checks if t is a number type

func IsSigned

func IsSigned(t Type) bool

IsSigned checks if t is a signed type.

func IsText

func IsText(t Type) bool

IsText checks if t is a text type.

func IsTime

func IsTime(t Type) bool

IsTime checks if t is a timestamp, date or datetime

func IsTuple

func IsTuple(t Type) bool

IsTuple checks if t is a tuple type. Note that tupleT instances with just 1 value are not considered as a tuple, but a parenthesized value.

func IsUnsigned

func IsUnsigned(t Type) bool

IsUnsigned checks if t is an unsigned type.

func IsVarChar

func IsVarChar(t Type) bool

IsVarChar checks if t is a varchar type.

func MySQLTypeName

func MySQLTypeName(t Type) string

MySQLTypeName returns the MySQL display name for the given type.

func NumColumns

func NumColumns(t Type) int

NumColumns returns the number of columns in a type. This is one for all types, except tuples.

func ValidateTime

func ValidateTime(t time.Time) interface{}

ValidateTime receives a time and returns either that time or nil if it's not a valid time.

Types

type BaseSession

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

BaseSession is the basic session type.

func (*BaseSession) Address

func (s *BaseSession) Address() string

Address returns the server address.

func (*BaseSession) ClearWarnings

func (s *BaseSession) ClearWarnings()

ClearWarnings cleans up session warnings

func (*BaseSession) Client

func (s *BaseSession) Client() Client

Client returns session's client information.

func (*BaseSession) Get

func (s *BaseSession) Get(key string) (Type, interface{})

Get implements the Session interface.

func (*BaseSession) GetAll

func (s *BaseSession) GetAll() map[string]TypedValue

GetAll returns a copy of session configuration

func (*BaseSession) ID

func (s *BaseSession) ID() uint32

ID implements the Session interface.

func (*BaseSession) Set

func (s *BaseSession) Set(key string, typ Type, value interface{})

Set implements the Session interface.

func (*BaseSession) Warn

func (s *BaseSession) Warn(warn *Warning)

Warn stores the warning in the session.

func (*BaseSession) WarningCount

func (s *BaseSession) WarningCount() uint16

WarningCount returns a number of session warnings

func (*BaseSession) Warnings

func (s *BaseSession) Warnings() []*Warning

Warnings returns a copy of session warnings (from the most recent - the last one) The function implements sql.Session interface

type Catalog

type Catalog struct {
	// FunctionRegistry
	// *IndexRegistry
	*ProcessList
	*MemoryManager
	// contains filtered or unexported fields
}

Catalog holds databases, tables and functions.

func NewCatalog

func NewCatalog() *Catalog

NewCatalog returns a new empty Catalog.

func (*Catalog) AddDatabase

func (c *Catalog) AddDatabase(db Database)

AddDatabase adds a new database to the catalog.

func (*Catalog) AllDatabases

func (c *Catalog) AllDatabases() Databases

AllDatabases returns all databases in the catalog.

func (*Catalog) CurrentDatabase

func (c *Catalog) CurrentDatabase() string

CurrentDatabase returns the current database.

func (*Catalog) Database

func (c *Catalog) Database(db string) (Database, error)

Database returns the database with the given name.

func (*Catalog) SetCurrentDatabase

func (c *Catalog) SetCurrentDatabase(db string)

SetCurrentDatabase changes the current database.

func (*Catalog) Table

func (c *Catalog) Table(db, table string) (Table, error)

Table returns the table in the given database with the given name.

type Client

type Client struct {
	// User of the session.
	User string
	// Address of the client.
	Address string
}

Client holds session user information.

type Column

type Column struct {
	// Name is the name of the column.
	Name string
	// Type is the data type of the column.
	Type Type
	// Default contains the default value of the column or nil if it is NULL.
	Default interface{}
	// Nullable is true if the column can contain NULL values, or false
	// otherwise.
	Nullable bool
	// Source is the name of the table this column came from.
	Source string
	// PrimaryKey is true if the column is part of the primary key for its table.
	PrimaryKey bool
}

Column is the definition of a table column. As SQL:2016 puts it:

A column is a named component of a table. It has a data type, a default,
and a nullability characteristic.

func (*Column) Check

func (c *Column) Check(v interface{}) bool

Check ensures the value is correct for this column.

func (*Column) Equals

func (c *Column) Equals(c2 *Column) bool

Equals checks whether two columns are equal.

type Context

type Context struct {
	context.Context
	Session
	Memory *MemoryManager
	// contains filtered or unexported fields
}

Context of the query execution.

func NewContext

func NewContext(
	ctx context.Context,
	opts ...ContextOption,
) *Context

NewContext creates a new query context. Options can be passed to configure the context. If some aspect of the context is not configure, the default value will be used. By default, the context will have an empty base session, a noop tracer and a memory manager using the process reporter.

func NewEmptyContext

func NewEmptyContext() *Context

NewEmptyContext returns a default context with default values.

func (*Context) Error

func (c *Context) Error(code int, msg string, args ...interface{})

Error adds an error as warning to the session.

func (*Context) Pid

func (c *Context) Pid() uint64

Pid returns the process id associated with this context.

func (*Context) Query

func (c *Context) Query() string

Query returns the query string associated with this context.

func (*Context) RootSpan

func (c *Context) RootSpan() opentracing.Span

RootSpan returns the root span, if any.

func (*Context) Span

func (c *Context) Span(
	opName string,
	opts ...opentracing.StartSpanOption,
) (opentracing.Span, *Context)

Span creates a new tracing span with the given context. It will return the span and a new context that should be passed to all childrens of this span.

func (*Context) Warn

func (c *Context) Warn(code int, msg string, args ...interface{})

Warn adds a warning to the session.

func (*Context) WithContext

func (c *Context) WithContext(ctx context.Context) *Context

WithContext returns a new context with the given underlying context.

type ContextOption

type ContextOption func(*Context)

ContextOption is a function to configure the context.

func WithMemoryManager

func WithMemoryManager(m *MemoryManager) ContextOption

WithMemoryManager adds the given memory manager to the context.

func WithPid

func WithPid(pid uint64) ContextOption

WithPid adds the given pid to the context.

func WithQuery

func WithQuery(q string) ContextOption

WithQuery adds the given query to the context.

func WithRootSpan

func WithRootSpan(s opentracing.Span) ContextOption

WithRootSpan sets the root span of the context.

func WithSession

func WithSession(s Session) ContextOption

WithSession adds the given session to the context.

func WithTracer

func WithTracer(t opentracing.Tracer) ContextOption

WithTracer adds the given tracer to the context.

type Database

type Database interface {
	Nameable
	// Tables returns the information of all tables.
	Tables() map[string]Table
}

Database represents the database.

type Databaser

type Databaser interface {
	// Database the current database.
	Database() Database
	// WithDatabase returns a new node instance with the database replaced with
	// the one given as parameter.
	WithDatabase(Database) (Node, error)
}

Databaser is a node that contains a reference to a database.

type Databases

type Databases []Database

Databases is a collection of Database.

func (*Databases) Add

func (d *Databases) Add(db Database)

Add adds a new database.

func (Databases) Database

func (d Databases) Database(name string) (Database, error)

Database returns the Database with the given name if it exists.

func (Databases) Table

func (d Databases) Table(dbName string, tableName string) (Table, error)

Table returns the Table with the given name if it exists.

type Disposable

type Disposable interface {
	// Dispose the contents.
	Dispose()
}

Disposable objects can erase all their content when they're no longer in use. They should not be used again after they've been disposed.

type DisposeFunc

type DisposeFunc func()

DisposeFunc is a function to completely erase a cache and remove it from the manager.

type Freeable

type Freeable interface {
	// Free the memory.
	Free()
}

Freeable objects can free their memory.

type KeyValueCache

type KeyValueCache interface {
	// Put a new value in the cache.
	Put(uint64, interface{}) error
	// Get the value with the given key.
	Get(uint64) (interface{}, error)
}

KeyValueCache is a cache of key value pairs.

type MemoryManager

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

MemoryManager is in charge of keeping track and managing all the components that operate in memory. There should only be one instance of a memory manager running at the same time in each process.

func NewMemoryManager

func NewMemoryManager(r Reporter) *MemoryManager

NewMemoryManager creates a new manager with the given memory reporter. If nil is given, then the Process reporter will be used by default.

func (*MemoryManager) Free

func (m *MemoryManager) Free()

Free the memory of all freeable caches.

func (*MemoryManager) HasAvailable

func (m *MemoryManager) HasAvailable() bool

HasAvailable reports whether the memory manager has any available memory.

type Nameable

type Nameable interface {
	// Name returns the name.
	Name() string
}

Nameable is something that has a name.

type Node

type Node interface {
	// Resolvable
	fmt.Stringer
	// Schema of the node.
	Schema() Schema
	// // Children nodes.
	// Children() []Node
	// RowIter produces a row iterator from this node.
	RowIter(*Context) (RowIter, error)
}

Node is a node in the execution plan tree.

type PartitionProgress

type PartitionProgress struct {
	Progress
}

PartitionProgress keeps track of a partition progress

func (PartitionProgress) String

func (p PartitionProgress) String() string

type Process

type Process struct {
	Pid        uint64
	Connection uint32
	User       string
	Type       ProcessType
	Query      string
	Progress   map[string]TableProgress
	StartedAt  time.Time
	Kill       context.CancelFunc
}

Process represents a process in the SQL server.

func (*Process) Done

func (p *Process) Done()

Done needs to be called when this process has finished.

func (*Process) Seconds

func (p *Process) Seconds() uint64

Seconds returns the number of seconds this process has been running.

type ProcessList

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

ProcessList is a structure that keeps track of all the processes and their status.

func NewProcessList

func NewProcessList() *ProcessList

NewProcessList creates a new process list.

func (*ProcessList) AddPartitionProgress

func (pl *ProcessList) AddPartitionProgress(pid uint64, tableName, partitionName string, total int64)

AddPartitionProgress adds a new item to track progress from to the process with the given pid. If the pid or the table does not exist, it will do nothing.

func (*ProcessList) AddProcess

func (pl *ProcessList) AddProcess(
	ctx *Context,
	typ ProcessType,
	query string,
) (*Context, error)

AddProcess adds a new process to the list given a process type and a query. Steps is a map between the name of the items that need to be completed and the total amount in these items. -1 means unknown. It returns a new context that should be passed around from now on. That context will be cancelled if the process is killed.

func (*ProcessList) AddTableProgress

func (pl *ProcessList) AddTableProgress(pid uint64, name string, total int64)

AddTableProgress adds a new item to track progress from to the process with the given pid. If the pid does not exist, it will do nothing.

func (*ProcessList) Done

func (pl *ProcessList) Done(pid uint64)

Done removes the finished process with the given pid from the process list. If the process does not exist, it will do nothing.

func (*ProcessList) Kill

func (pl *ProcessList) Kill(connID uint32)

Kill terminates all queries for a given connection id.

func (*ProcessList) KillOnlyQueries

func (pl *ProcessList) KillOnlyQueries(connID uint32)

KillOnlyQueries kills all queries, but not index creation queries, for a given connection id.

func (*ProcessList) Processes

func (pl *ProcessList) Processes() []Process

Processes returns the list of current running processes.

func (*ProcessList) RemovePartitionProgress

func (pl *ProcessList) RemovePartitionProgress(pid uint64, tableName, partitionName string)

RemovePartitionProgress removes an existing item tracking progress from the process with the given pid, if it exists.

func (*ProcessList) RemoveTableProgress

func (pl *ProcessList) RemoveTableProgress(pid uint64, name string)

RemoveTableProgress removes an existing item tracking progress from the process with the given pid, if it exists.

func (*ProcessList) UpdatePartitionProgress

func (pl *ProcessList) UpdatePartitionProgress(pid uint64, tableName, partitionName string, delta int64)

UpdatePartitionProgress updates the progress of the table partition with the given name for the process with the given pid.

func (*ProcessList) UpdateTableProgress

func (pl *ProcessList) UpdateTableProgress(pid uint64, name string, delta int64)

UpdateTableProgress updates the progress of the table with the given name for the process with the given pid.

type ProcessType

type ProcessType byte

ProcessType is the type of process.

const (
	// QueryProcess is a query process.
	QueryProcess ProcessType = iota
	// CreateIndexProcess is a process to create an index.
	CreateIndexProcess
)

func (ProcessType) String

func (p ProcessType) String() string

type Progress

type Progress struct {
	Name  string
	Done  int64
	Total int64
}

Progress between done items and total items.

type Reporter

type Reporter interface {
	// MaxMemory returns the maximum number of memory allowed in bytes.
	MaxMemory() uint64
	// UsedMemory returns the memory in use in bytes.
	UsedMemory() uint64
}

Reporter is a component that gives information about the memory usage.

var ProcessMemory Reporter = new(processReporter)

ProcessMemory is a reporter for the memory used by the process and the maximum amount of memory allowed controlled by the MAX_MEMORY environment variable.

type Row

type Row []interface{}

Row is a tuple of values.

func NewRow

func NewRow(values ...interface{}) Row

NewRow creates a row from the given values.

func NodeToRows

func NodeToRows(ctx *Context, n Node) ([]Row, error)

NodeToRows converts a node to a slice of rows.

func RowIterToRows

func RowIterToRows(i RowIter) ([]Row, error)

RowIterToRows converts a row iterator to a slice of rows.

func (Row) Copy

func (r Row) Copy() Row

Copy creates a new row with the same values as the current one.

func (Row) Equals

func (r Row) Equals(row Row, schema Schema) (bool, error)

Equals checks whether two rows are equal given a schema.

type RowIter

type RowIter interface {
	// Next retrieves the next row. It will return io.EOF if it's the last row.
	// After retrieving the last row, Close will be automatically closed.
	Next() (Row, error)
	// Close the iterator.
	Close() error
}

RowIter is an iterator that produces rows.

func NewSpanIter

func NewSpanIter(span opentracing.Span, iter RowIter) RowIter

NewSpanIter creates a RowIter executed in the given span.

func RowsToRowIter

func RowsToRowIter(rows ...Row) RowIter

RowsToRowIter creates a RowIter that iterates over the given rows.

type RowsCache

type RowsCache interface {
	// Add a new row to the cache. If there is no memory available, it will try to
	// free some memory. If after that there is still no memory available, it
	// will return an error and erase all the content of the cache.
	Add(Row) error
	// Get all rows.
	Get() []Row
}

RowsCache is a cache of rows.

type Schema

type Schema []*Column

Schema is the definition of a table.

func (Schema) CheckRow

func (s Schema) CheckRow(row Row) error

CheckRow checks the row conforms to the schema.

func (Schema) Contains

func (s Schema) Contains(column string, source string) bool

Contains returns whether the schema contains a column with the given name.

func (Schema) Equals

func (s Schema) Equals(s2 Schema) bool

Equals checks whether the given schema is equal to this one.

func (Schema) IndexOf

func (s Schema) IndexOf(column, source string) int

IndexOf returns the index of the given column in the schema or -1 if it's not present.

type Session

type Session interface {
	// Address of the server.
	Address() string
	// User of the session.
	Client() Client
	// Set session configuration.
	Set(key string, typ Type, value interface{})
	// Get session configuration.
	Get(key string) (Type, interface{})
	// GetAll returns a copy of session configuration
	GetAll() map[string]TypedValue
	// ID returns the unique ID of the connection.
	ID() uint32
	// Warn stores the warning in the session.
	Warn(warn *Warning)
	// Warnings returns a copy of session warnings (from the most recent).
	Warnings() []*Warning
	// ClearWarnings cleans up session warnings.
	ClearWarnings()
	// WarningCount returns a number of session warnings
	WarningCount() uint16
}

Session holds the session data.

func NewBaseSession

func NewBaseSession() Session

NewBaseSession creates a new empty session.

func NewSession

func NewSession(server, client, user string, id uint32) Session

NewSession creates a new session with data.

type Table

type Table interface {
	Nameable
	String() string
	Schema() Schema
}

Table represents the backend of a SQL table.

type TableProgress

type TableProgress struct {
	Progress
	PartitionsProgress map[string]PartitionProgress
}

TableProgress keeps track of a table progress, and for each of its partitions

func NewTableProgress

func NewTableProgress(name string, total int64) TableProgress

NewTableProgress ??????

func (TableProgress) String

func (p TableProgress) String() string

type Tableable

type Tableable interface {
	// Table returns the table name.
	Table() string
}

Tableable is something that has a table.

type Type

type Type interface {
	// Type returns the query.Type for the given Type.
	Type() query.Type
	// Covert a value of a compatible type to a most accurate type.
	Convert(interface{}) (interface{}, error)
	// Compare returns an integer comparing two values.
	// The result will be 0 if a==b, -1 if a < b, and +1 if a > b.
	Compare(interface{}, interface{}) (int, error)
	// SQL returns the sqltypes.Value for the given value.
	SQL(interface{}) (sqltypes.Value, error)
	fmt.Stringer
}

Type represent a SQL type.

func Array

func Array(underlying Type) Type

Array returns a new Array type of the given underlying type.

func Char

func Char(length int) Type

Char returns a new Char type of the given length.

func MysqlTypeToType

func MysqlTypeToType(sql query.Type) (Type, error)

MysqlTypeToType gets the column type using the mysql type

func Tuple

func Tuple(types ...Type) Type

Tuple returns a new tuple type with the given element types.

func UnderlyingType

func UnderlyingType(t Type) Type

UnderlyingType returns the underlying type of an array if the type is an array, or the type itself in any other case.

func VarChar

func VarChar(length int) Type

VarChar returns a new VarChar type of the given length.

type TypedValue

type TypedValue struct {
	Typ   Type
	Value interface{}
}

TypedValue is a value along with its type.

type Warning

type Warning struct {
	Level   string
	Message string
	Code    int
}

Warning stands for mySQL warning record.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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