dbms

package
v1.1.0-cassandra-enabled Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLStore

func NewSQLStore(connStr, tableName string, maxConcurrency int) (persistence.Persistence, error)

NewSQLStore initializes a new SQLStore with the specified table name.

Types

type SQLStore

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

SQLStore represents a store backed by an SQL database.

func (*SQLStore) Load

func (s *SQLStore) Load() (map[string]string, error)

Load retrieves all key-value pairs from the SQL database.

func (*SQLStore) SaveAllToDisk

func (s *SQLStore) SaveAllToDisk(store map[string]string)

SaveAllToDisk writes all key-value pairs to the SQL database concurrently.

func (*SQLStore) SaveToDisk

func (s *SQLStore) SaveToDisk(key, value, op string)

SaveToDisk writes a single key-value pair to the SQL database.

func (*SQLStore) ShutDown

func (s *SQLStore) ShutDown()

ShutDown closes the database connection.

Jump to

Keyboard shortcuts

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