sql

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package sql provides a SQL-based implementation of the record repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(opt Options) (tsdns.RecordRepository, error)

NewRepository creates a new RecordRepository backed by a SQL database.

Types

type Dialect

type Dialect string

Dialect represents the type of SQL database.

const (
	// DialectSQLite represents the SQLite database dialect.
	DialectSQLite Dialect = "sqlite"
	// DialectPostgres represents the PostgreSQL database dialect.
	DialectPostgres Dialect = "postgres"
	// DialectMySQL represents the MySQL database dialect.
	DialectMySQL Dialect = "mysql"
)

type Options

type Options struct {
	Dialect Dialect
	DSN     string
}

Options defines configuration parameters for the SQL repository.

Jump to

Keyboard shortcuts

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