/gpa

Yet Another Golang Persistence API

Primary LanguageGoApache License 2.0Apache-2.0

GPA: yet another Golang Persistence API

Installation

go get github.com/liupangzi/gpa

Document

1. .sql to Go struct

gpa mysql model -h can translate mysql ddl file to Go struct respecting the data alignment, e.g.:

  • .sql ddl file sql

  • Generated Golang struct model

2. Interface to Implementation

gpa mysql impl -h will generate Go implementations from pre-defined interface based on sqlx, e.g.:

  • Golang interface with annotations interface

  • Generated implementations implementation