cockroach: github.com/cockroachdb/cockroach/pkg/sql/catalog/accessors Index | Files

package accessors

import "github.com/cockroachdb/cockroach/pkg/sql/catalog/accessors"

Index

Package Files

logical_schema_accessors.go physical_schema_accessors.go

type CachedPhysicalAccessor Uses

type CachedPhysicalAccessor struct {
    catalog.Accessor
    // contains filtered or unexported fields
}

CachedPhysicalAccessor adds a cache on top of any Accessor.

func NewCachedAccessor Uses

func NewCachedAccessor(
    physicalAccessor catalog.Accessor, descsCol *descs.Collection,
) *CachedPhysicalAccessor

NewCachedAccessor constructs a new cached accessor using a physical accessor and a descs.Collection.

func (*CachedPhysicalAccessor) GetDatabaseDesc Uses

func (a *CachedPhysicalAccessor) GetDatabaseDesc(
    ctx context.Context,
    txn *kv.Txn,
    codec keys.SQLCodec,
    name string,
    flags tree.DatabaseLookupFlags,
) (desc sqlbase.DatabaseDescriptor, err error)

GetDatabaseDesc implements the Accessor interface.

func (*CachedPhysicalAccessor) GetObjectDesc Uses

func (a *CachedPhysicalAccessor) GetObjectDesc(
    ctx context.Context,
    txn *kv.Txn,
    settings *cluster.Settings,
    codec keys.SQLCodec,
    db, schema, object string,
    flags tree.ObjectLookupFlags,
) (catalog.Descriptor, error)

GetObjectDesc implements the Accessor interface.

func (*CachedPhysicalAccessor) GetSchema Uses

func (a *CachedPhysicalAccessor) GetSchema(
    ctx context.Context, txn *kv.Txn, codec keys.SQLCodec, dbID descpb.ID, scName string,
) (bool, sqlbase.ResolvedSchema, error)

GetSchema implements the Accessor interface.

type LogicalSchemaAccessor Uses

type LogicalSchemaAccessor struct {
    catalog.Accessor
    // contains filtered or unexported fields
}

LogicalSchemaAccessor extends an existing DatabaseLister with the ability to list tables in a virtual schema.

func NewLogicalAccessor Uses

func NewLogicalAccessor(
    physicalAccessor catalog.Accessor, vs catalog.VirtualSchemas,
) *LogicalSchemaAccessor

NewLogicalAccessor constructs a new accessor given an underlying physical accessor and VirtualSchemas.

func (*LogicalSchemaAccessor) GetObjectDesc Uses

func (l *LogicalSchemaAccessor) GetObjectDesc(
    ctx context.Context,
    txn *kv.Txn,
    settings *cluster.Settings,
    codec keys.SQLCodec,
    db, schema, object string,
    flags tree.ObjectLookupFlags,
) (catalog.Descriptor, error)

GetObjectDesc implements the ObjectAccessor interface.

func (*LogicalSchemaAccessor) GetObjectNames Uses

func (l *LogicalSchemaAccessor) GetObjectNames(
    ctx context.Context,
    txn *kv.Txn,
    codec keys.SQLCodec,
    dbDesc sqlbase.DatabaseDescriptor,
    scName string,
    flags tree.DatabaseListFlags,
) (tree.TableNames, error)

GetObjectNames implements the DatabaseLister interface.

func (*LogicalSchemaAccessor) GetSchema Uses

func (l *LogicalSchemaAccessor) GetSchema(
    ctx context.Context, txn *kv.Txn, codec keys.SQLCodec, dbID descpb.ID, scName string,
) (bool, sqlbase.ResolvedSchema, error)

GetSchema implements the Accessor interface.

Package accessors imports 14 packages (graph) and is imported by 1 packages. Updated 2020-08-12. Refresh now. Tools for package owners.