db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: BSD-3-Clause Imports: 0 Imported by: 25

Documentation

Overview

Package db provides general datastore support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func(t Transaction) error

Action represents a sequence of operations to be done in a single transaction. t is that single transaction. The action must pass t as the transaction to each datastore operation.

type Doer

type Doer interface {
	Do(action Action) error
}

Doer performs an action within a single transaction. Each implementation specific database package underneath this package has a NewDoer method that creates an instance of this interface for that implementation.

type Transaction

type Transaction interface{}

Transaction represents a database transaction. When a nil Transaction is passed to a datastore operation, it means run the operation in its own transaction.

Directories

Path Synopsis
Package sqlite_db contains common types and functions for storing data in a sqlite database.
Package sqlite_db contains common types and functions for storing data in a sqlite database.
Package sqlite_rw reads and updates sqlite databases using consumers from the github.com/keep94/goconsume package.
Package sqlite_rw reads and updates sqlite databases using consumers from the github.com/keep94/goconsume package.

Jump to

Keyboard shortcuts

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