database

package
v0.0.0-...-478ad6c Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sqlite   = "sqlite"
	Postgres = "postgres"
)

Variables

This section is empty.

Functions

func Open

func Open(cfg *Config) (*gorm.DB, error)

Types

type Config

type Config struct {
	// DSN the Data Source Name.
	DSN string

	// Disable automatic ping.
	DisableAutomaticPing bool

	// Prepared statement.
	PreparedStmt bool

	// Max DB open connections.
	MaxOpenConns int

	// Max DB idle connections.
	MaxIdleConns int

	LogLevel logger.LogLevel
}

Jump to

Keyboard shortcuts

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