liupangzi / gpa

Yet Another Golang Persistence API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Yet Another Golang Persistence API

License:Apache License 2.0


Languages

Language:Go 96.9%Language:ANTLR 2.9%Language:TSQL 0.2%