Documentation
¶
Index ¶
- func New(logger logger.Logger) state.Store
- type IndexedProperty
- type KeyType
- type SQLServer
- func (s *SQLServer) BulkGet(ctx context.Context, req []state.GetRequest, _ state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (s *SQLServer) CleanupExpired() error
- func (s *SQLServer) Close() error
- func (s *SQLServer) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (s *SQLServer) Features() []state.Feature
- func (s *SQLServer) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (s *SQLServer) GetCleanupInterval() *time.Duration
- func (s *SQLServer) GetComponentMetadata() (metadataInfo metadata.MetadataMap)
- func (s *SQLServer) Init(ctx context.Context, metadata state.Metadata) error
- func (s *SQLServer) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (s *SQLServer) Set(ctx context.Context, req *state.SetRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IndexedProperty ¶
type IndexedProperty struct {
ColumnName string `json:"column"`
Property string `json:"property"`
Type string `json:"type"`
}
IndexedProperty defines a indexed property.
type KeyType ¶
type KeyType string
KeyType defines type of the table identifier.
const ( // StringKeyType defines a key of type string. StringKeyType KeyType = "string" // UUIDKeyType defines a key of type UUID/GUID. UUIDKeyType KeyType = "uuid" // IntegerKeyType defines a key of type integer. IntegerKeyType KeyType = "integer" // InvalidKeyType defines an invalid key type. InvalidKeyType KeyType = "invalid" )
func KeyTypeFromString ¶
KeyTypeFromString tries to create a KeyType from a string value.
type SQLServer ¶
SQLServer defines a MS SQL Server based state store.
func (*SQLServer) BulkGet ¶
func (s *SQLServer) BulkGet(ctx context.Context, req []state.GetRequest, _ state.BulkGetOpts) ([]state.BulkGetResponse, error)
BulkGet retrieves multiple entities in a single round-trip per chunk using a `WHERE [Key] IN (...)` query. When the number of requested keys exceeds the configured BulkGetChunkSize, BulkGet issues multiple chunked queries sequentially (not in parallel) and merges the results. This avoids SQL Server's hard 2100-parameter limit and reduces connection-pool pressure versus the default per-key fan-out.
The default chunk size is 1000, so callers with <= 1000 keys see a single query.
func (*SQLServer) CleanupExpired ¶
func (*SQLServer) Get ¶
func (s *SQLServer) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
Get returns an entity from store.
func (*SQLServer) GetCleanupInterval ¶
GetCleanupInterval returns the cleanupInterval property. This is primarily used for tests.
func (*SQLServer) GetComponentMetadata ¶
func (s *SQLServer) GetComponentMetadata() (metadataInfo metadata.MetadataMap)