database

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, connection string, debug bool) (*gorm.DB, error)

Connect to database

func ConnectMasterSlave

func ConnectMasterSlave(ctx context.Context, master, slave string, debug bool) (*gorm.DB, *gorm.DB, error)

ConnectMasterSlave databases

func WithDatabase

func WithDatabase(ctx context.Context, master, slave *gorm.DB) context.Context

WithDatabase puts databases to context

Types

This section is empty.

Jump to

Keyboard shortcuts

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