<p>A couple of months ago, <a href="https://github.com/go-gorp/gorp" rel="nofollow">gorp</a> made an announcement about the future maintenance not being very active.</p>
<p>What would you use in 2017 for a new mid size web app build in Go? The metal db/sql? Any happy users of sqlx? Or would you build with gorp even though its development is not very active anymore? Any other suggestions?</p>
<p>EDIT: And what about the migration tools? Which one is more mature and maintained?</p>
<hr/>**评论:**<br/><br/>neoasterisk: <pre><p>I haven't used it myself but I've seen lots of hype around <a href="https://github.com/vattle/sqlboiler" rel="nofollow">SQLBoiler</a>. </p>
<p>Also sqlx is a fine choice.</p>
<p>Personally I use plain SQL with <code>database/sql</code>.</p></pre>ptinyc: <pre><p>I've used SQLBoiler on a few different projects and it works well. It uses code generation which after a lot of experimenting and using other DB libs I believe is a good approach.</p>
<p>Works well in combination with <a href="https://bitbucket.org/liamstask/goose/" rel="nofollow">goose</a> which I use for migrating the database itself.</p>
<p>edit: fix link</p></pre>tvmaly: <pre><p>I am planning on still using gorp for a new version of my side project in 2017. It saves me quite a bit of boiler plate and still lets me stay close to the sql.</p></pre>kaeshiwaza: <pre><p>sqlrow seems fine also but i did the same with sqlx + some little custom functions.
For migration i use a table to keep the current version and a code with one function with sql and some code to migrate from v.x to v.x+1 and v.x+1</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传