You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spanner should have helpful aliases for param types #3364
Activity
tseaver commentedon Jul 25, 2017
@jonparrott Aliasing the "scalar" types is easy (PR #3670). What do you envision for array / struct?
theacodes commentedon Jul 25, 2017
@tseaver would
listanddictwork, e.g.:theacodes commentedon Jul 25, 2017
Oh nevermind, ignore my last comment, I'm being thick.
What does it look like today to if you need to specify an array / struct?
Create parameter type aliases for scalar field types. (#3670)
tseaver commentedon Jul 27, 2017
@jonparrott For arrays, you have to pass the type of the elements:
For structs, you have to construct / pass a
StructTypedescribing the members:theacodes commentedon Jul 28, 2017
@tseaver that's pretty rough. Is it possible to make it into something like:
tseaver commentedon Jul 28, 2017
@jonparrott Assuming you meant to have the open square bracket after
types.Struct(the order matters) that should be straightforward.theacodes commentedon Jul 28, 2017
Actually I didn't, I meant for types.Struct to just use *args. But yeah, let's do it. :)
tseaver commentedon Jul 28, 2017
@jonparrott Should we name those factories
ArrayParamType/StructParamType(to be equivalent to theFOO_PARAM_TYPEaliases?theacodes commentedon Jul 28, 2017
Sure, if that's all they're used for.
tseaver commentedon Jul 28, 2017
Conceptually they describe types of returned cell values, too, but we don't expose that.
Add factories to ease creation of array / struct parameter types. (#3700
Create parameter type aliases for scalar field types. (googleapis#3670)
Add factories to ease creation of array / struct parameter types. (go…
Create parameter type aliases for scalar field types. (googleapis#3670)
Add factories to ease creation of array / struct parameter types. (go…
Create parameter type aliases for scalar field types. (googleapis#3670)
Add factories to ease creation of array / struct parameter types. (go…
Create parameter type aliases for scalar field types. (#3670)
Add factories to ease creation of array / struct parameter types. (#3700