test

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

func (c *Catalog) AllDatabases(ctx *sql.Context) []sql.Database

AllDatabases returns all sliceDBProvider in the catalog.

func (*Catalog) CreateDatabase

func (c *Catalog) CreateDatabase(ctx *sql.Context, dbName string, collation sql.CollationID) error

CreateDatabase creates a new Database and adds it to the catalog.

func (*Catalog) DataLength

func (c *Catalog) DataLength(ctx *sql.Context, db, table string) (uint64, error)

func (*Catalog) Database

func (c *Catalog) Database(ctx *sql.Context, db string) (sql.Database, error)

Database returns the database with the given name.

func (*Catalog) DatabaseTable

func (c *Catalog) DatabaseTable(ctx *sql.Context, db sql.Database, tableName string) (sql.Table, sql.Database, error)

func (*Catalog) DatabaseTableAsOf

func (c *Catalog) DatabaseTableAsOf(ctx *sql.Context, db sql.Database, tableName string, asOf interface{}) (sql.Table, sql.Database, error)

func (*Catalog) DropDbStats

func (c *Catalog) DropDbStats(ctx *sql.Context, db string, flush bool) error

func (*Catalog) DropStats

func (c *Catalog) DropStats(ctx *sql.Context, qual sql.StatQualifier, cols []string) error

func (*Catalog) ExternalStoredProcedure

func (c *Catalog) ExternalStoredProcedure(ctx *sql.Context, name string, numOfParams int) (*sql.ExternalStoredProcedureDetails, error)

func (*Catalog) ExternalStoredProcedures

func (c *Catalog) ExternalStoredProcedures(ctx *sql.Context, name string) ([]sql.ExternalStoredProcedureDetails, error)

func (*Catalog) Function

func (c *Catalog) Function(ctx *sql.Context, name string) (sql.Function, error)

func (*Catalog) GetStats

func (c *Catalog) GetStats(ctx *sql.Context, qual sql.StatQualifier, cols []string) (sql.Statistic, bool)

func (*Catalog) GetTableStats

func (c *Catalog) GetTableStats(ctx *sql.Context, db, table string) ([]sql.Statistic, error)

func (*Catalog) HasDatabase

func (c *Catalog) HasDatabase(ctx *sql.Context, db string) bool

func (*Catalog) LockTable

func (c *Catalog) LockTable(ctx *sql.Context, table string)

func (*Catalog) RefreshTableStats

func (c *Catalog) RefreshTableStats(ctx *sql.Context, table sql.Table, db string) error

func (*Catalog) RegisterFunction

func (c *Catalog) RegisterFunction(ctx *sql.Context, fns ...sql.Function)

func (*Catalog) RemoveDatabase

func (c *Catalog) RemoveDatabase(ctx *sql.Context, dbName string) error

RemoveDatabase removes a database from the catalog.

func (*Catalog) RowCount

func (c *Catalog) RowCount(ctx *sql.Context, db, table string) (uint64, error)

func (*Catalog) SetStats

func (c *Catalog) SetStats(ctx *sql.Context, stats sql.Statistic) error

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.

func (*Catalog) TableAsOf

func (c *Catalog) TableAsOf(ctx *sql.Context, dbName, tableName string, asOf interface{}) (sql.Table, sql.Database, error)

func (*Catalog) TableFunction

func (c *Catalog) TableFunction(ctx *sql.Context, name string) (sql.TableFunction, error)

func (*Catalog) UnlockTables

func (c *Catalog) UnlockTables(ctx *sql.Context, id uint32) error

func (*Catalog) WithTableFunctions

func (c *Catalog) WithTableFunctions(fns ...sql.TableFunction) (sql.TableFunctionProvider, error)

type MemTracer

type MemTracer struct {
	Spans []string
	sync.Mutex
}

MemTracer implements a simple tracer in memory for testing.

func (*MemTracer) Start

func (t *MemTracer) Start(ctx context.Context, operationName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

Jump to

Keyboard shortcuts

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