sqlutil

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sqlutil provides utilities to SQL-related instrumentation modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DriverName

func DriverName(d driver.Driver) string

DriverName returns the name of the driver, based on its type. If the driver name cannot be deduced, DriverName will return "generic".

func QuerySignature

func QuerySignature(query string) string

QuerySignature returns the "signature" for a query: a high level description of the operation.

For DDL statements (CREATE, DROP, ALTER, etc.), we we only report the first keyword, on the grounds that these statements are not expected to be common within the hot code paths of an application. For SELECT, INSERT, and UPDATE, and DELETE, we attempt to extract the first table name. If we are unable to identify the table name, we simply omit it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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