go-agent: github.com/newrelic/go-agent/v3/newrelic/sqlparse Index | Files

package sqlparse

import "github.com/newrelic/go-agent/v3/newrelic/sqlparse"

Index

Package Files

sqlparse.go

func ParseQuery Uses

func ParseQuery(segment *newrelic.DatastoreSegment, query string)

ParseQuery parses table and operation from the SQL query string. It is a helper meant to be used when writing database/sql driver instrumentation. Check out full example usage here: https://github.com/newrelic/go-agent/blob/master/v3/integrations/nrmysql/nrmysql.go

ParseQuery is designed to work with MySQL, Postgres, and SQLite drivers. Ability to correctly parse queries for other SQL databases is not guaranteed.

Package sqlparse imports 3 packages (graph) and is imported by 4 packages. Updated 2020-02-11. Refresh now. Tools for package owners.