persistence

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package persistence provides MySQL-specific implementations of the interfaces in Ax's top-level "persistence" package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractDB

func ExtractDB(ds persistence.DataStore) *sql.DB

ExtractDB returns the SQL database within ds. It panics if ds is not a *DataStore.

func ExtractTx

func ExtractTx(tx persistence.Tx) *sql.Tx

ExtractTx returns the SQL transaction within tx. It panics if tx is not a *Tx.

Types

type DataStore

type DataStore struct {
	DB *sql.DB
}

DataStore is a MySQL-backed implementation of Ax's persistence.DataStore interface.

func (*DataStore) BeginTx

BeginTx starts a new transaction.

type Tx

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

Tx is a MySQL-backed implementation of Ax's persistence.Tx interface.

func (*Tx) DataStore

func (tx *Tx) DataStore() persistence.DataStore

DataStore returns the DataStore that the transaction operates on.

Jump to

Keyboard shortcuts

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