database

package
v0.0.0-...-9a745d8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldID

type FieldID struct {
	ID uint `json:"id" gorm:"primarykey"`
}

type FieldTimes

type FieldTimes struct {
	CreatedAt time.Time      `json:"created"`
	UpdatedAt time.Time      `json:"updated"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
}

type Mongo

type Mongo struct {
}

func (*Mongo) Default

func (m *Mongo) Default() *gorm.DB

func (*Mongo) R

func (m *Mongo) R(name string) *gorm.DB

func (*Mongo) W

func (m *Mongo) W(name string) *gorm.DB

type MySQL

type MySQL struct {
	// contains filtered or unexported fields
}

func New

func New(c *config.Config) (*MySQL, error)

func (*MySQL) Default

func (d *MySQL) Default() *gorm.DB

func (*MySQL) R

func (d *MySQL) R(name string) *gorm.DB

R ReadDB

func (*MySQL) Select

func (d *MySQL) Select(name string) *gorm.DB

func (*MySQL) W

func (d *MySQL) W(name string) *gorm.DB

W WriteDB

Jump to

Keyboard shortcuts

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