开发者

Google Go datastore interfaces

开发者 https://www.devze.com 2023-03-05 18:58 出处:网络
What are your thoughts on go-pgsql and thrift4go? I\'d like to use Go with either Postgres or Hypert开发者_如何学编程able for a project, but I\'m curious as to how mature and complete these interface

What are your thoughts on go-pgsql and thrift4go?

I'd like to use Go with either Postgres or Hypert开发者_如何学编程able for a project, but I'm curious as to how mature and complete these interfaces are.


I don't have specific experience with go-psql, but since there's no answer I'll write my thoughts.

There are issues with the current implementation, which might bite you (e.g. time resolution lower than seconds is ignored. What happens if you update a single field, but your ORM decides to include a time field within the query?).

Other problem that I see is, there's no promise this project will be maintained as long as you wish.

Another approach is to build a very simple binding to the postgres C interface, and just use it. In that case, the abstraction is not very helpful, but definitely not leaky. And it might be enough.

That's what Russ Cox (from the core Go (golang) team) ended up doing for sqlite.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号