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
Currently (v1.0.18) API Table columns of type timestamp accept and produce JSON String values (using ISO-8601 encoding). This is different from Collections where EJSON-wrapping with numeric timestamp like:
{ "$date" : 123005946 }
is accepted and produced.
Questions: should we use or allow EJSON-wrapped values for API Tables as well? There are couple of questions to decide:
Should we accept both notations ("plain" String and EJsonWrapper) or just one -- and if so, which one?
If both are accepted, which one should be produced (returned with "findXxx" commands (if only one accepted that'd be one produced too)
If EJSON-wrapped value accepted, should it accept numeric Timestamp (like Collections), or ISO-8601 String (like current API Table).
These decisions should be based on what makes most sense from client perspective: since API Tables not yet externally released we can still change the notation/representation to use.
EDIT:
Answers: we will work to maximize interoperability with Collections.
Should accept BOTH, for interoperability with Collections (so yes accept ALSO EJSON-wrapped values)
Return "plain" ISO-8601 String representation (same as now, no change)
Accept Timestamp (seconds since Epoch, Java long), same as with Collections, for interoperability.
The text was updated successfully, but these errors were encountered:
Someday stargate-mongoose may need a "am I talking to a table or a collection?" option, but it would be great to avoid that if possible. Supporting { $date } would mean we can do dates without knowing table or collection.
@vkarpov15 That's the idea indeed! Thank you for confirming that the change makes sense. I hope to tackle this issue soon.
tatu-at-datastax
changed the title
Consider using/allowing $date (EJSON wrapper) for API Table timestamp values
Allow use of $date (EJSON wrapper) for API Table timestamp values (similar to Collections)
Oct 24, 2024
Currently (v1.0.18) API Table columns of type
timestamp
accept and produce JSON String values (using ISO-8601 encoding). This is different from Collections where EJSON-wrapping with numeric timestamp like:is accepted and produced.
Questions: should we use or allow EJSON-wrapped values for API Tables as well? There are couple of questions to decide:
These decisions should be based on what makes most sense from client perspective: since API Tables not yet externally released we can still change the notation/representation to use.
EDIT:
Answers: we will work to maximize interoperability with Collections.
long
), same as with Collections, for interoperability.The text was updated successfully, but these errors were encountered: