英文:
Is it possible to use Python's property classes for Datastore from the Go runtime?
问题
我正在使用GAE(Managed VMs)上的Go运行时与Datastore。最近我发现了这个页面,它讨论了与Python运行时和Expando相关的类型和属性类。
我想在Go中使用对ListProperties
的查询。这可能吗?当然,我知道google.golang.org/appengine/datastore
没有暴露这个功能。
英文:
I am using the Go runtime on GAE (Managed VMs) with Datastore. Just recently I found this page that talks about Types and Property classes in connection with the Python runtime and Expando.
I would like to use queries against ListProperties
from Go. Is that possible? Of course I know that google.golang.org/appengine/datastore
does not expose this feature.
答案1
得分: 1
根据我所了解,Golang的数据存储API支持列表属性。因此,你应该可以在Python中使用ndb.StringProperty(repeated=True)
作为属性,在Go语言中使用[]string
,它们应该可以很好地互操作。
英文:
The golang datastore API supports list properties as far as I know. So you should be able to have a property that is a ndb.StringProperty(repeated=True)
in python and []string
in go and they should interoperate fine.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论