Skip to content

liupangzi/gpa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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