Documentation
¶
Index ¶
- Constants
- func ExtractTableNames(logger log.Logger, digest string, stmt sqlparser.Statement) []string
- func ParseSql(sql string) (sqlparser.Statement, error)
- func ParseTableName(t sqlparser.TableName) string
- func RedactSQL(sql string) (string, error)
- func StmtType(stmt sqlparser.Statement) string
- type ConnectionInfo
- type ConnectionInfoArguments
- type QuerySample
- type QuerySampleArguments
- type SchemaTable
- type SchemaTableArguments
Constants ¶
View Source
const ( OP_QUERY_SAMPLE = "query_sample" OP_QUERY_PARSED_TABLE_NAME = "query_parsed_table_name" QuerySampleName = "query_sample" )
View Source
const ( OP_SCHEMA_DETECTION = "schema_detection" OP_TABLE_DETECTION = "table_detection" OP_CREATE_STATEMENT = "create_statement" SchemaTableName = "schema_table" )
View Source
const ConnectionInfoName = "connection_info"
Variables ¶
This section is empty.
Functions ¶
func ExtractTableNames ¶ added in v1.7.0
func ParseTableName ¶ added in v1.7.0
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct { DSN string Registry *prometheus.Registry InfoMetric *prometheus.GaugeVec // contains filtered or unexported fields }
func NewConnectionInfo ¶
func NewConnectionInfo(args ConnectionInfoArguments) (*ConnectionInfo, error)
func (*ConnectionInfo) Name ¶
func (c *ConnectionInfo) Name() string
func (*ConnectionInfo) Stop ¶
func (c *ConnectionInfo) Stop()
func (*ConnectionInfo) Stopped ¶
func (c *ConnectionInfo) Stopped() bool
type ConnectionInfoArguments ¶
type ConnectionInfoArguments struct { DSN string Registry *prometheus.Registry }
type QuerySample ¶
type QuerySample struct {
// contains filtered or unexported fields
}
func NewQuerySample ¶
func NewQuerySample(args QuerySampleArguments) (*QuerySample, error)
func (*QuerySample) Name ¶
func (c *QuerySample) Name() string
func (*QuerySample) Stopped ¶
func (c *QuerySample) Stopped() bool
type QuerySampleArguments ¶
type SchemaTable ¶
type SchemaTable struct {
// contains filtered or unexported fields
}
func NewSchemaTable ¶
func NewSchemaTable(args SchemaTableArguments) (*SchemaTable, error)
func (*SchemaTable) Name ¶
func (c *SchemaTable) Name() string
func (*SchemaTable) Stopped ¶
func (c *SchemaTable) Stopped() bool
Click to show internal directories.
Click to hide internal directories.