tinysqlite

package
v1.0.36 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package tinysqlite provides utilities for handling sqlite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dsn string, opts ...Opt) (*gorm.DB, error)

Open tries to open an instance of sqlite3 database and then return *gorm.DB instance to interact with it.

Types

type Config

type Config struct {
	// Verbose specifies whether to log all executed queries.
	Verbose bool
	// contains filtered or unexported fields
}

Config holds a configuration for Open.

type Opt

type Opt = func(*Config)

Opt is an option to be specified to DialPostgres.

func GormOpt

func GormOpt(gormOpt func(*gorm.Config)) Opt

GormOpt adds an option to modify the default gorm.Config.

func Verbose

func Verbose() Opt

Verbose tells client to log all executed queries.

Jump to

Keyboard shortcuts

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