Proposal - #1
gophersbd / ormpb Goto Github PK
View Code? Open in Web Editor NEWWIP Go ORM Implementation based on Protocol Buffer Definition
License: MIT License
WIP Go ORM Implementation based on Protocol Buffer Definition
License: MIT License
Proposal - #1
As first version of ORM lets start implementing with following
Drop obsolete import of testify
package: this is not needed anymore in the Go modules era.
Need to revendor master. make build
doesn't work.
This library intend to design a ORM for go based on the protobuf definitions. This issue intend to have discussion about design and implementation, that needed to be asked and answered.
Most of the ORM design in go is based on struct tags. But generating from protobuf we needed to implement a way to get the tags from the field mappings, with out tagging the structure.
In short the orm should have two basic part -
Generator
Generates code definition, sql statements from protobuf definition. For reference This could follow the pattern of grpc-gateway, that generates go http proxy for gRPC services.
This also includes mapping between protobuf types and sql types.
Generator can heavily use protobuf Message Option and Field Option to take targeted inputs from user specifically indicating sql behaviours for fields indicating column and message indicating table.
For further flexibility generator can also generate sql statements and/or migrations, based on previous definitions and fields serials.
In future that may also generates helper methods to use with library.
Library
Actual implementations of the ORM that uses generated data to integrate with. Can follow pattern based on gorm or xorm two of most popular go orm libraries.
Comments and Suggestion wanted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.