Skip to content

femaref/dbx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages