Wo types#17
Conversation
|
While this is more correct, and needs doing for the SQL^2 case, it's really not great for everywhere else we use it in SlamData. I guess we'll need a variety which is a |
|
@garyb This looks like it is useless, but in fact it's not. In slamdata/slamdata#1624 quasar values are used to construct SqlSquare AST, that has all those funcs: So, there's motivation
OTOH, @sellout said that EJson has special notation of metadata like And this can be used when we switch from json to ejson. But I think adding this |
|
I understand all that stuff, but I don't think we want to parse a response that is typed as What I'm suggesting is we use a different representation for that data that is EJsonF + typed literals, that we can translate to an SQL^2 type if we need to, but when we're just loading data, we don't want to deal with function invocations just to be able to know that a value is typed as |
|
I'm not sure that I follow :( We get untyped thing if we use I understand that we want to preserve structural types info, but they probably would be presented as tags/metadata that we can decode to separate |
|
BTW, we don't use any date|time info in SlamData, it's produced by markdown and then printed and vice versa, parsed and set to markdown value. |
The "untyped+metadata" still has explicit formats for date, time, etc. though - we don't want to have to do the work of parsing that based on metadata values every time, we just want to get something back that has already decoded it into purescript types - otherwise we'll be back to the situation we had up until recently (when the constructors were stringly typed) where we have a whole bunch of duplicated code that does the decoding/parsing of these values.
I think we're agreeing 😄 - I'm suggesting we move those literal constructors that were deleted into a new algebra, and then I can use that as |
|
Ok, cool. BTW, why not produce |
@garyb @natefaubion Please take a look
I removed tagged literals since they're not part of ejson and made arbitrary ejson having any kind of keys