Categorygithub.com/femaref/dbx
modulepackage
0.0.0-20210904111941-1a16d0059ee7
Repository: https://github.com/femaref/dbx.git
Documentation: pkg.go.dev

# README

Dependencies:

- github.com/jmoiron/sqlx

Example for connection:

connString := fmt.Sprintf("user=%s dbname=%s sslmode=disable password=%s", config.Config.Postgres.Username, config.Config.Postgres.Database, config.Config.Postgres.Password)
db := dbx.MustConnect()
db.QuoteIdentifier = pq.QuoteIdentifier

Example for current methods:

db.Create(&model)
db.Get(&model, id)
db.Select(&[]model, condition)

They all use the Tabler interface, so if the name of the table is not the plural of the struct name, fullfil the interface.

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author