database

package
v1.0.1-0...-55f3d51 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DB is the connection handle
	DB *sql.DB
)
View Source
var Orm *gorm.DB

Orm represents database is the connection handle

Functions

func Delete

func Delete(query string, args ...interface{}) (int64, error)

Delete request

func DumpDatabase

func DumpDatabase(structureOnly bool, dataOnly bool) (string, int)

DumpDatabase : Dump de la base de données

func InitDatabase

func InitDatabase()

InitDatabase : Initialisation de la base de données

func Insert

func Insert(query string, args ...interface{}) (int64, error)

Insert request

func Migrate

func Migrate(db *gorm.DB)

Migrate the schema

func Open

func Open()

Open opens database connection

func OpenORM

func OpenORM()

OpenORM connects to the database and links to the ORM

func Select

func Select(query string, args ...interface{}) (*sql.Rows, error)

Select request

func Update

func Update(query string, args ...interface{}) (int64, error)

Update request

Types

This section is empty.

Jump to

Keyboard shortcuts

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