sqlserver

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverName = "sqlserver"
)

Variables

This section is empty.

Functions

func CreateSchema

func CreateSchema(r io.Reader, db *sqlx.DB, f func() (*sqlx.DB, error)) error

func PathToDir

func PathToDir() (string, error)

Types

type Conf

type Conf struct {
	ConnPool  *internal.ConnPoolConf  `yaml:"connPool" conf:",example=\n  maxLifeTime: 60m\n  maxIdleTime: 45s\n  maxOpen: 4\n  maxIdle: 1"`
	ConnRetry *internal.ConnRetryConf `yaml:"connRetry" conf:",example=\n  maxAttempts: 3\n  initialInterval: 0.5s\n  maxInterval: 60s"`
	// URL is the SQL Server connection URL. See https://github.com/microsoft/go-mssqldb#connection-parameters-and-dsn.
	URL string `yaml:"url" conf:"required,example=\"sqlserver://username:password@host/instance?param1=value&param2=value\""`
	// SkipSchemaCheck skips checking for required database tables on startup.
	SkipSchemaCheck bool `yaml:"skipSchemaCheck" conf:",example=false"`
}

Conf is required (if driver is set to 'sqlserver') configuration for mssql driver. +desc=This section is required only if storage.driver is sqlserver.

func (*Conf) Key

func (c *Conf) Key() string

func (*Conf) Validate added in v0.33.0

func (c *Conf) Validate() error

type Store

type Store struct {
	internal.DBStorage
}

func NewStore

func NewStore(ctx context.Context, conf *Conf) (*Store, error)

func (*Store) Driver

func (s *Store) Driver() string

Jump to

Keyboard shortcuts

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