db

package
v0.0.0-...-6b9a90a Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScanMaxChanges = 512

Functions

This section is empty.

Types

type ChangeLogState

type ChangeLogState = int16
const (
	Pending   ChangeLogState = 0
	Published ChangeLogState = 1
	Failed    ChangeLogState = -1
)

type Connector

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

func (Connector) Connect

func (t Connector) Connect(_ context.Context) (driver.Conn, error)

func (Connector) Driver

func (t Connector) Driver() driver.Driver

type SQLiteCDC

type SQLiteCDC struct {
	// TODO probably get rid of goqu if not fully utilized
	*goqu.Database

	Events chan any
	// contains filtered or unexported fields
}

func NewSQLiteCDC

func NewSQLiteCDC(path string, tables []string) (*SQLiteCDC, error)

func (*SQLiteCDC) AddCDC

func (cdc *SQLiteCDC) AddCDC() error

AddCDC creates single global log table and per configured log table. Creates triggers to update each log tables of changes.

func (*SQLiteCDC) RemoveCDC

func (cdc *SQLiteCDC) RemoveCDC() error

func (*SQLiteCDC) Watch

func (cdc *SQLiteCDC) Watch()

Jump to

Keyboard shortcuts

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