xdao

package
v0.0.0-...-0f6f436 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Mysql = "mysql"
View Source
const Pgsql = "pgsql"
View Source
const Sqlite = "sqlite"

Variables

This section is empty.

Functions

func Clauses

func Clauses(conds ...clause.Expression) *gorm.DB

func Count

func Count(m interface{}, query interface{}, args ...interface{}) (count int64)

func Create

func Create(value interface{}) *gorm.DB

func Exist

func Exist(model, query interface{}, args ...interface{}) bool

func Initialize

func Initialize(dsn DsnParams, models []any) (err error)

func Model

func Model(value interface{}) *gorm.DB

func Raw

func Raw(sql string, values ...interface{}) *gorm.DB

func Select

func Select(query interface{}, args ...interface{}) *gorm.DB

func Table

func Table(name string, args ...interface{}) *gorm.DB

func Transaction

func Transaction(fc func(tx *gorm.DB) error, opts ...*sql.TxOptions) error

func Where

func Where(query interface{}, args ...interface{}) *gorm.DB

Types

type DsnParams

type DsnParams struct {
	Type     string
	Host     string
	Port     string
	User     string
	Password string
	DBName   string
}

func (*DsnParams) String

func (s *DsnParams) String() string

Jump to

Keyboard shortcuts

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