db

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package db provide convenient access to sqlite database. This uses context.Context as a store that you can pass around to database operations from it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(ctx context.Context) bool

Check performs health check on the database. This make sure we can query the database

func Exists

func Exists(ctx context.Context, where func(db *gorm.DB) *gorm.DB) bool

func ExistsDB

func ExistsDB(db *gorm.DB, where func(db *gorm.DB) *gorm.DB) bool

func Get

func Get(ctx context.Context) *gorm.DB

func LOG

func LOG(ctx context.Context, err error, msg string, f ...func(*zerolog.Event) *zerolog.Event)

func Set

func Set(ctx context.Context, db *gorm.DB) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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