singlestore

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SourceType string = "singlestore"

SourceType for SingleStore source

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name             string            `yaml:"name" validate:"required"`
	Type             string            `yaml:"type" validate:"required"`
	Host             string            `yaml:"host" validate:"required"`
	Port             string            `yaml:"port" validate:"required"`
	User             string            `yaml:"user" validate:"required"`
	Password         string            `yaml:"password" validate:"required"`
	Database         string            `yaml:"database" validate:"required"`
	QueryTimeout     string            `yaml:"queryTimeout"`
	ConnectionParams map[string]string `yaml:"connectionParams"`
}

Config holds the configuration parameters for connecting to a SingleStore database.

func (Config) Initialize

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error)

Initialize sets up the SingleStore connection pool and returns a Source.

func (Config) SourceConfigType

func (r Config) SourceConfigType() string

SourceConfigType returns the type of the source configuration.

type Source

type Source struct {
	Config
	Pool *sql.DB
}

Source represents a SingleStore database source and holds its connection pool.

func (*Source) RunSQL

func (s *Source) RunSQL(ctx context.Context, statement string, params []any) (any, error)

func (*Source) SingleStorePool

func (s *Source) SingleStorePool() *sql.DB

SingleStorePool returns the underlying *sql.DB connection pool for SingleStore.

func (*Source) SourceType

func (s *Source) SourceType() string

SourceType returns the type of the source configuration.

func (*Source) ToConfig

func (s *Source) ToConfig() sources.SourceConfig

Jump to

Keyboard shortcuts

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