dbmysql

package
v0.0.0-...-69aae1f Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dsn string) (kolektor.Storer, error)

New instantiates a PostgreSQL backed data store.

Types

type Store

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

Store defines the MySQL backed data store.

func (*Store) Connection

func (s *Store) Connection(ctx context.Context) (any, error)

Connection returns a connection to the store. The caller is responsible for type asserting the result to the appropriated type for this store, namely *sql.Conn.

func (*Store) GetObject

func (s *Store) GetObject(obj kolektor.Modeler, fieldMap kolektor.FieldMap) error

GetObject retrieves a stored object and stores it in obj.

func (*Store) InitCollection

func (s *Store) InitCollection(model kolektor.Modeler) error

InitCollection initializes the model's collection.

func (*Store) Name

func (s *Store) Name() string

Name returns the name of the data store.

func (*Store) RemoveCollection

func (s *Store) RemoveCollection(model kolektor.Modeler) error

RemoveCollection removes the model's collection.

func (*Store) StoreObject

func (s *Store) StoreObject(obj kolektor.Modeler) (*kolektor.Meta, error)

StoreObject stores obj into the collection of the object's model.

Jump to

Keyboard shortcuts

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