mysql

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package mysql provides MySQL type provider for CEL type system integration.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidSchema indicates a problem with the provided schema or database introspection.
	ErrInvalidSchema = errors.New("invalid schema")
)

Sentinel errors for the mysql package.

View Source
var NewSchema = schema.NewSchema

NewSchema creates a new Schema. This is an alias for schema.NewSchema.

Functions

This section is empty.

Types

type FieldSchema

type FieldSchema = schema.FieldSchema

FieldSchema is an alias for schema.FieldSchema.

type Schema

type Schema = schema.Schema

Schema is an alias for schema.Schema.

type TypeProvider

type TypeProvider interface {
	types.Provider
	LoadTableSchema(ctx context.Context, tableName string) error
	GetSchemas() map[string]Schema
	Close()
}

TypeProvider interface for MySQL type providers.

func NewTypeProvider

func NewTypeProvider(schemas map[string]Schema) TypeProvider

NewTypeProvider creates a new MySQL type provider with pre-defined schemas.

func NewTypeProviderWithConnection

func NewTypeProviderWithConnection(_ context.Context, db *sql.DB) (TypeProvider, error)

NewTypeProviderWithConnection creates a new MySQL type provider that can introspect database schemas. The caller owns the *sql.DB and is responsible for closing it.

Jump to

Keyboard shortcuts

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