Giter VIP home page Giter VIP logo

ormpb's Introduction

ormpb

Build Status Go Report Card Coverage Status stability-wip

Proposal - #1

ormpb's People

Contributors

mirshahriar avatar sadlil avatar

Stargazers

Joshua Dotson avatar Song Liu avatar Saddam H avatar Shalauddin Ahamad Shuza avatar Abu Hanifa avatar Ahmed shamim avatar  avatar  avatar Sakib Sami avatar

Watchers

James Cloos avatar  avatar Ahnaf Tahmid Chowdhury  avatar Abu Hanifa avatar Shalauddin Ahamad Shuza avatar

ormpb's Issues

[Proposal] An ORM Implementation based on Protocol Buffer 3 definition

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.