-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于Value的处理 #306
Comments
都有吧。 我的需求: 然后我看了内部实现,就发现这地方。数据输出的逻辑里面,定义了一个Value,这个Value的属性就上面一堆,你是什么类型的数据,就存到对应的字段。等到输出的时候,写了一大串if else。不够优雅,所以,就想问问这么设计的初衷是啥? 顺便问下,在value_wrapper里面加上这个方法成不? func (valWrap ValueWrapper) GetValue() *nebula.Value {
return valWrap.value
} 虽然用起来很麻烦,但起码有个口子能拿到结构化数据,而不是字符串 |
我是这样转的,还是踩了一个坑,value.asNull()返回的是0(数据库schema是字符串),我干脆返回nil了 |
这段不能理解,按照逻辑,这里面的属性,只会有一个有值,那把它写成any,然后进行类型判断不好吗?做个interface,不是更简洁?
The text was updated successfully, but these errors were encountered: