db

package
v0.0.0-...-caa70b2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Uri         string
	MaxOpenConn int
	MaxIdleConn int
}

Database holds properties needed for making db connection.

func NewDatabase

func NewDatabase(uri string, maxOpen int, maxIdle int) Database

func (Database) OpenDb

func (db Database) OpenDb() (*bun.DB, error)

OpenDb implements ports.Db interface and opens new connection. Returns *bun.DB, or error if connection failed.

Jump to

Keyboard shortcuts

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