sqlite

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorReminder added in v1.15.0

type ActorReminder struct {
	RegisteredTime time.Time
	ExpirationTime time.Time
	Period         string
	Data           any
	ActorID        string
	ActorType      string
	Name           string
	DueTime        string
}

type ActorTypeReminders added in v1.15.0

type ActorTypeReminders struct {
	Key            string
	Reminders      []ActorReminder
	IsBinary       bool
	Etag           string
	ExpirationTime *time.Time
	UpdateTime     *time.Time
}

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 WithDBPath added in v1.15.0

func WithDBPath(dbPath string) Option

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".

func WithTableName added in v1.15.0

func WithTableName(tableName string) Option

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) ActorReminders added in v1.15.0

func (s *SQLite) ActorReminders(t *testing.T, ctx context.Context, actorType string) ActorTypeReminders

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) GetTableName added in v1.15.0

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

GetTableName returns the connection to the SQLite database.

func (*SQLite) Run

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

func (*SQLite) TableName added in v1.15.0

func (s *SQLite) TableName() string

Jump to

Keyboard shortcuts

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