mysql

package module
v0.0.0-...-14c4923 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mysql implements a storage interface for Aries (aries-framework-go).

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyRequired = errors.New("key is mandatory")

ErrKeyRequired is returned when key is mandatory.

Functions

This section is empty.

Types

type Option

type Option func(opts *Provider)

Option configures the couchdb provider.

func WithDBPrefix

func WithDBPrefix(dbPrefix string) Option

WithDBPrefix option is for adding prefix to db name.

type Provider

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

Provider represents a MySQL DB implementation of the storage.Provider interface.

func NewProvider

func NewProvider(dbPath string, opts ...Option) (*Provider, error)

NewProvider instantiates Provider. Example DB Path root:my-secret-pw@tcp(127.0.0.1:3306)/ This provider's CreateStore(name) implementation creates stores that are backed by a table under a schema with the same name as the table. The fully qualified name of the table is thus `name.name`. The fully qualified name of the table needs to be used with the store's `Query()` method.

func (*Provider) Close

func (p *Provider) Close() error

Close closes all stores created under this store provider.

func (*Provider) GetOpenStores

func (p *Provider) GetOpenStores() []storage.Store

GetOpenStores is currently not implemented.

func (*Provider) GetStoreConfig

func (p *Provider) GetStoreConfig(string) (storage.StoreConfiguration, error)

GetStoreConfig is currently not implemented.

func (*Provider) OpenStore

func (p *Provider) OpenStore(name string) (storage.Store, error)

OpenStore opens a store with the given name and returns a handle. If the store has never been opened before, then it is created. Store names are not case-sensitive. If name is blank, then an error will be returned.

func (*Provider) SetStoreConfig

func (p *Provider) SetStoreConfig(string, storage.StoreConfiguration) error

SetStoreConfig is currently not implemented.

Jump to

Keyboard shortcuts

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