sqlite

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option is a function that configures the process.

func WithActorStateStore

func WithActorStateStore(enabled bool) Option

WithActorStateStore configures whether the state store is enabled as actor state store.

func WithCreateStateTables

func WithCreateStateTables() Option

WithCreateStateTables configures whether the state store should create the state tables.

func WithExecs

func WithExecs(execs ...string) Option

WithExecs defines the execs to run against the database on Run.

func WithMetadata

func WithMetadata(key, value string) Option

WithMetadata adds a metadata option to the component. This can be invoked multiple times.

func WithName

func WithName(name string) Option

WithName sets the name for the state store. Default is "mystore".

type SQLite

type SQLite struct {
	// contains filtered or unexported fields
}

SQLite database that can be used in integration tests. Consumers should always run this Process before any other Framework Processes which consume it so all migrations are applied.

func New

func New(t *testing.T, fopts ...Option) *SQLite

func (*SQLite) Cleanup

func (s *SQLite) Cleanup(t *testing.T)

func (*SQLite) GetComponent

func (s *SQLite) GetComponent(t *testing.T) string

GetComponent returns the Component resource.

func (*SQLite) GetConnection

func (s *SQLite) GetConnection(t *testing.T) *sql.DB

GetConnection returns the connection to the SQLite database.

func (*SQLite) Run

func (s *SQLite) Run(t *testing.T, ctx context.Context)

Jump to

Keyboard shortcuts

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