Skip to content

Repositories

Piotr Kowalczuk edited this page Sep 6, 2018 · 4 revisions

Repository separates the logic that retrieves the data and maps it to the entity model from the business logic that acts on the model. Every table defined within the schema will get corresponding repository.

type <entity>RepositoryBase struct {
	table   string
	columns []string
	db      *sql.DB
	dbg     bool
	log     log.Logger
}
Clone this wiki locally