db

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: BSD-3-Clause Imports: 0 Imported by: 37

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 sqlite3_db contains common types and functions for storing data in a sqlite3 database.
Package sqlite3_db contains common types and functions for storing data in a sqlite3 database.
Package sqlite3_rw reads and updates sqlite3 databases using consumers from the github.com/keep94/consume2 package.
Package sqlite3_rw reads and updates sqlite3 databases using consumers from the github.com/keep94/consume2 package.

Jump to

Keyboard shortcuts

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