Documentation ¶
Index ¶
- func NewSQLiteStateStore(logger logger.Logger) state.Store
- type DBAccess
- type SQLiteStore
- func (s *SQLiteStore) BulkGet(ctx context.Context, req []state.GetRequest, _ state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (s *SQLiteStore) Features() []state.Feature
- func (s *SQLiteStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (s SQLiteStore) GetComponentMetadata() map[string]string
- func (s *SQLiteStore) GetDBAccess() *sqliteDBAccess
- func (s *SQLiteStore) Init(ctx context.Context, metadata state.Metadata) error
- func (s *SQLiteStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (s *SQLiteStore) Ping(ctx context.Context) error
- func (s *SQLiteStore) Set(ctx context.Context, req *state.SetRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBAccess ¶
type DBAccess interface { Init(ctx context.Context, metadata state.Metadata) error Ping(ctx context.Context) error Set(ctx context.Context, req *state.SetRequest) error Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error) Delete(ctx context.Context, req *state.DeleteRequest) error BulkGet(ctx context.Context, req []state.GetRequest) ([]state.BulkGetResponse, error) ExecuteMulti(ctx context.Context, reqs []state.TransactionalStateOperation) error Close() error }
DBAccess is a private interface which enables unit testing of SQLite.
type SQLiteStore ¶
SQLite Database state store.
func (*SQLiteStore) BulkGet ¶
func (s *SQLiteStore) BulkGet(ctx context.Context, req []state.GetRequest, _ state.BulkGetOpts) ([]state.BulkGetResponse, error)
BulkGet performs a bulks get operations. Options are ignored because this component requests all values in a single query.
func (*SQLiteStore) Delete ¶
func (s *SQLiteStore) Delete(ctx context.Context, req *state.DeleteRequest) error
Delete removes an entity from the store.
func (*SQLiteStore) Features ¶
func (s *SQLiteStore) Features() []state.Feature
Features returns the features available in this state store.
func (*SQLiteStore) Get ¶
func (s *SQLiteStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
Get returns an entity from store.
func (SQLiteStore) GetComponentMetadata ¶
func (s SQLiteStore) GetComponentMetadata() map[string]string
func (*SQLiteStore) GetDBAccess ¶ added in v1.11.0
func (s *SQLiteStore) GetDBAccess() *sqliteDBAccess
Returns the dbaccess property. This method is used in tests.
func (*SQLiteStore) Multi ¶
func (s *SQLiteStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
Multi handles multiple transactions. Implements TransactionalStore.
func (*SQLiteStore) Set ¶
func (s *SQLiteStore) Set(ctx context.Context, req *state.SetRequest) error
Set adds/updates an entity on store.
Click to show internal directories.
Click to hide internal directories.