database

package
v0.0.0-...-5bb0c7b Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sqlx.DB
}

type Filter

type Filter map[string]interface{}

type OptionModifier

type OptionModifier func(*options)

OptionModifier is a wrapper for options.

func WithAllowRoot

func WithAllowRoot() OptionModifier

WithAllowRoot will make it so that root spans will be created if a trace could not be found using opentracing's SpanFromContext method.

func WithDistributedTracing

func WithDistributedTracing() OptionModifier

WithDistributedTracing will make it so that a wrapped driver is used that supports the opentracing API.

func WithOmitArgsFromTraceSpans

func WithOmitArgsFromTraceSpans() OptionModifier

WithOmitArgsFromTraceSpans will make it so that query arguments are omitted from tracing spans.

func WithRandomDriverName

func WithRandomDriverName() OptionModifier

WithRandomDriverName is specifically for writing tests as you can't register a driver with the same name more than once.

type SQLConnection

type SQLConnection struct {
	DSN string
	// contains filtered or unexported fields
}

func (*SQLConnection) GetDatabase

func (c *SQLConnection) GetDatabase() *sqlx.DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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