{"action":"created","issue":{"url":"https://api.github.com/repos/gophersbd/ormpb/issues/1","repository_url":"https://api.github.com/repos/gophersbd/ormpb","labels_url":"https://api.github.com/repos/gophersbd/ormpb/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/gophersbd/ormpb/issues/1/comments","events_url":"https://api.github.com/repos/gophersbd/ormpb/issues/1/events","html_url":"https://github.com/gophersbd/ormpb/issues/1","id":312173398,"number":1,"title":"[Proposal] An ORM Implementation based on Protocol Buffer 3 definition","user":{"login":"sadlil","id":5103096,"avatar_url":"https://avatars0.githubusercontent.com/u/5103096?v=4","gravatar_id":"","url":"https://api.github.com/users/sadlil","html_url":"https://github.com/sadlil","followers_url":"https://api.github.com/users/sadlil/followers","following_url":"https://api.github.com/users/sadlil/following{/other_user}","gists_url":"https://api.github.com/users/sadlil/gists{/gist_id}","starred_url":"https://api.github.com/users/sadlil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadlil/subscriptions","organizations_url":"https://api.github.com/users/sadlil/orgs","repos_url":"https://api.github.com/users/sadlil/repos","events_url":"https://api.github.com/users/sadlil/events{/privacy}","received_events_url":"https://api.github.com/users/sadlil/received_events","type":"User","site_admin":false},"labels":[{"id":886966035,"url":"https://api.github.com/repos/gophersbd/ormpb/labels/proposal","name":"proposal","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"alaminopu","id":1296554,"avatar_url":"https://avatars2.githubusercontent.com/u/1296554?v=4","gravatar_id":"","url":"https://api.github.com/users/alaminopu","html_url":"https://github.com/alaminopu","followers_url":"https://api.github.com/users/alaminopu/followers","following_url":"https://api.github.com/users/alaminopu/following{/other_user}","gists_url":"https://api.github.com/users/alaminopu/gists{/gist_id}","starred_url":"https://api.github.com/users/alaminopu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaminopu/subscriptions","organizations_url":"https://api.github.com/users/alaminopu/orgs","repos_url":"https://api.github.com/users/alaminopu/repos","events_url":"https://api.github.com/users/alaminopu/events{/privacy}","received_events_url":"https://api.github.com/users/alaminopu/received_events","type":"User","site_admin":false},"assignees":[{"login":"alaminopu","id":1296554,"avatar_url":"https://avatars2.githubusercontent.com/u/1296554?v=4","gravatar_id":"","url":"https://api.github.com/users/alaminopu","html_url":"https://github.com/alaminopu","followers_url":"https://api.github.com/users/alaminopu/followers","following_url":"https://api.github.com/users/alaminopu/following{/other_user}","gists_url":"https://api.github.com/users/alaminopu/gists{/gist_id}","starred_url":"https://api.github.com/users/alaminopu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaminopu/subscriptions","organizations_url":"https://api.github.com/users/alaminopu/orgs","repos_url":"https://api.github.com/users/alaminopu/repos","events_url":"https://api.github.com/users/alaminopu/events{/privacy}","received_events_url":"https://api.github.com/users/alaminopu/received_events","type":"User","site_admin":false},{"login":"aerokite","id":4655476,"avatar_url":"https://avatars2.githubusercontent.com/u/4655476?v=4","gravatar_id":"","url":"https://api.github.com/users/aerokite","html_url":"https://github.com/aerokite","followers_url":"https://api.github.com/users/aerokite/followers","following_url":"https://api.github.com/users/aerokite/following{/other_user}","gists_url":"https://api.github.com/users/aerokite/gists{/gist_id}","starred_url":"https://api.github.com/users/aerokite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerokite/subscriptions","organizations_url":"https://api.github.com/users/aerokite/orgs","repos_url":"https://api.github.com/users/aerokite/repos","events_url":"https://api.github.com/users/aerokite/events{/privacy}","received_events_url":"https://api.github.com/users/aerokite/received_events","type":"User","site_admin":false},{"login":"sadlil","id":5103096,"avatar_url":"https://avatars0.githubusercontent.com/u/5103096?v=4","gravatar_id":"","url":"https://api.github.com/users/sadlil","html_url":"https://github.com/sadlil","followers_url":"https://api.github.com/users/sadlil/followers","following_url":"https://api.github.com/users/sadlil/following{/other_user}","gists_url":"https://api.github.com/users/sadlil/gists{/gist_id}","starred_url":"https://api.github.com/users/sadlil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadlil/subscriptions","organizations_url":"https://api.github.com/users/sadlil/orgs","repos_url":"https://api.github.com/users/sadlil/repos","events_url":"https://api.github.com/users/sadlil/events{/privacy}","received_events_url":"https://api.github.com/users/sadlil/received_events","type":"User","site_admin":false},{"login":"s4kibs4mi","id":5650785,"avatar_url":"https://avatars2.githubusercontent.com/u/5650785?v=4","gravatar_id":"","url":"https://api.github.com/users/s4kibs4mi","html_url":"https://github.com/s4kibs4mi","followers_url":"https://api.github.com/users/s4kibs4mi/followers","following_url":"https://api.github.com/users/s4kibs4mi/following{/other_user}","gists_url":"https://api.github.com/users/s4kibs4mi/gists{/gist_id}","starred_url":"https://api.github.com/users/s4kibs4mi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s4kibs4mi/subscriptions","organizations_url":"https://api.github.com/users/s4kibs4mi/orgs","repos_url":"https://api.github.com/users/s4kibs4mi/repos","events_url":"https://api.github.com/users/s4kibs4mi/events{/privacy}","received_events_url":"https://api.github.com/users/s4kibs4mi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-07T05:53:55Z","updated_at":"2018-04-09T07:09:20Z","closed_at":null,"author_association":"OWNER","body":"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.\r\n\r\nMost 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. \r\nIn short the orm should have two basic part - \r\n\r\n**Generator** \r\nGenerates code definition, sql statements from protobuf definition. For reference This could follow the pattern of [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway), that generates go http proxy for gRPC services.\r\nThis also includes mapping between protobuf types and sql types.\r\n - [proto 3 scaler types](https://developers.google.com/protocol-buffers/docs/proto3#scalar)\r\n - [mysql data types](https://dev.mysql.com/doc/refman/5.7/en/data-types.html)\r\n - [postgres data types](http://www.postgresqltutorial.com/postgresql-data-types/)\r\n\r\nGenerator 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.\r\n\r\nFor further flexibility generator can also generate sql statements and/or migrations, based on previous definitions and fields serials.  \r\nIn future that may also generates helper methods to use with library. \r\n\r\n\r\n**Library**\r\nActual implementations of the ORM that uses generated data to integrate with. Can follow pattern based on [gorm](https://github.com/jinzhu/gorm) or [xorm](https://github.com/go-xorm/xorm) two of most popular go orm libraries. \r\n\r\nComments and Suggestion wanted. "},"comment":{"url":"https://api.github.com/repos/gophersbd/ormpb/issues/comments/379655942","html_url":"https://github.com/gophersbd/ormpb/issues/1#issuecomment-379655942","issue_url":"https://api.github.com/repos/gophersbd/ormpb/issues/1","id":379655942,"user":{"login":"aerokite","id":4655476,"avatar_url":"https://avatars2.githubusercontent.com/u/4655476?v=4","gravatar_id":"","url":"https://api.github.com/users/aerokite","html_url":"https://github.com/aerokite","followers_url":"https://api.github.com/users/aerokite/followers","following_url":"https://api.github.com/users/aerokite/following{/other_user}","gists_url":"https://api.github.com/users/aerokite/gists{/gist_id}","starred_url":"https://api.github.com/users/aerokite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerokite/subscriptions","organizations_url":"https://api.github.com/users/aerokite/orgs","repos_url":"https://api.github.com/users/aerokite/repos","events_url":"https://api.github.com/users/aerokite/events{/privacy}","received_events_url":"https://api.github.com/users/aerokite/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T07:09:20Z","updated_at":"2018-04-09T07:09:20Z","author_association":"MEMBER","body":"**Question:** \r\n\r\nIf I want to create a table where one column type can be `Blob`, `LongBlob`, `Bytea` or others. All represent `string` in Go and proto3. How can we do that without tagging **sql types** in proto message?\r\n\r\n"}}
{"actor":{"display_login":"aerokite"}}