checkpoint

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package checkpoint defines WAL checkpoint modes for SQLite.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMode = fmt.Errorf("invalid checkpoint mode")

ErrInvalidMode is returned when a checkpoint mode is not recognised.

Functions

This section is empty.

Types

type Mode

type Mode string

Mode defines the WAL checkpoint behaviour on close. These map directly to SQLite's PRAGMA wal_checkpoint modes.

const (
	None     Mode = ""
	Passive  Mode = "PASSIVE"
	Full     Mode = "FULL"
	Restart  Mode = "RESTART"
	Truncate Mode = "TRUNCATE"
)

Checkpoint modes for use with the Checkpoint() builder method.

func (Mode) Valid added in v0.3.0

func (m Mode) Valid() bool

Valid reports whether m is a recognised checkpoint mode.

Jump to

Keyboard shortcuts

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