util

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() (*mysql.Config, error)

func GetDB

func GetDB(c mysql.Config) (*sql.DB, error)

func GetLogFilePaths added in v1.1.0

func GetLogFilePaths() []string

func GetWatcher

func GetWatcher(paths []string) (*fsnotify.Watcher, error)

func RunCommonHandler

func RunCommonHandler()

func SetupLogger

func SetupLogger()

func SkipAll

func SkipAll(reader io.Reader)

Types

type Log

type Log struct {
	Id, QueryTime, LockTime, RowsSent, RowsExamined, Query string
}

func GetLastQueryLog

func GetLastQueryLog(reader io.Reader) (*Log, error)

type Plan

type Plan struct {
	Rows []Row
	Id   string
}

func GetPlan

func GetPlan(db *sql.DB, query string) (*Plan, error)

type Row

type Row struct {
	Id                                                                                               int
	SelectType, Table, Partitions, AccessType, PossibleKeys, Key, KeyLen, Ref, Rows, Filtered, Extra sql.NullString
}

Jump to

Keyboard shortcuts

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