Documentation ¶
Index ¶
- func NewCatalog(provider sql.DatabaseProvider) sql.Catalog
- type Catalog
- func (c *Catalog) AllDatabases() []sql.Database
- func (c *Catalog) CreateDatabase(ctx *sql.Context, dbName string) error
- func (c *Catalog) Database(db string) (sql.Database, error)
- func (c *Catalog) Function(name string) (sql.Function, error)
- func (c *Catalog) HasDB(db string) bool
- func (c *Catalog) LockTable(ctx *sql.Context, table string)
- func (c *Catalog) RegisterFunction(fns ...sql.Function)
- func (c *Catalog) RemoveDatabase(ctx *sql.Context, dbName string) error
- func (c *Catalog) Table(ctx *sql.Context, dbName, tableName string) (sql.Table, sql.Database, error)
- func (c *Catalog) TableAsOf(ctx *sql.Context, dbName, tableName string, asOf interface{}) (sql.Table, sql.Database, error)
- func (c *Catalog) UnlockTables(ctx *sql.Context, id uint32) error
- type MemTracer
- func (t *MemTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
- func (t *MemTracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
- func (t *MemTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCatalog ¶
func NewCatalog(provider sql.DatabaseProvider) sql.Catalog
NewCatalog returns a new empty Catalog with the given provider
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func (*Catalog) AllDatabases ¶
AllDatabases returns all sliceDBProvider in the catalog.
func (*Catalog) CreateDatabase ¶
CreateDatabase creates a new Database and adds it to the catalog.
func (*Catalog) RegisterFunction ¶
func (*Catalog) RemoveDatabase ¶
RemoveDatabase removes a database from the catalog.
func (*Catalog) Table ¶
func (c *Catalog) Table(ctx *sql.Context, dbName, tableName string) (sql.Table, sql.Database, error)
Table returns the table in the given database with the given name.
type MemTracer ¶
MemTracer implements a simple tracer in memory for testing.
func (*MemTracer) Extract ¶
func (t *MemTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
Extract implements opentracing.Tracer interface.
func (*MemTracer) Inject ¶
func (t *MemTracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
Inject implements opentracing.Tracer interface.
func (*MemTracer) StartSpan ¶
func (t *MemTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
StartSpan implements opentracing.Tracer interface.
Click to show internal directories.
Click to hide internal directories.