Skip to content
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

RSDK-9180: Change TabularDataBySQL/MQL return type to raw BSON in Flutter SDK #286

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

jckras
Copy link
Member

@jckras jckras commented Oct 30, 2024

For context: The return type of the TabularDataBySQL/MQL proto has changed to return both a list of structs, the existing return type, and also a list of bytearrays that represent BSON.

Added a required dependency to bson to use the BSON library for dart
BSON provides a BsonCodec.deserialize() and BsonCodec.serialize() function for converting lists of byte sequences into lists of dart objects.

Testing:
Updated the data testing input to include DateTime objects, as the Flutter SDK will receive date fields in this format. I added a check to ensure that DateTime inputs are returned as native Flutter DateTime objects

I ensured that date fields are returned as native dart DateTime objects instead of strings by running tabularDataByMQL against real tabular data on viam-dev and printed the decoded data and their types. As you can see below the date and time elements are of type "DateTime":
Screenshot 2024-10-31 at 4 20 47 PM

@jckras jckras marked this pull request as ready for review October 31, 2024 14:22
@jckras jckras requested a review from a team as a code owner October 31, 2024 14:22
@purplenicole730
Copy link
Member

Is this considered a breaking change?

@jckras
Copy link
Member Author

jckras commented Oct 31, 2024

Is this considered a breaking change?

Yes! we talked off-line about this but yes since the dates/times will be given back as native Date objects and not strings this is a breaking change. I posted in eng-breaking-changes

@jckras jckras merged commit 019edba into viamrobotics:main Nov 1, 2024
4 checks passed
@jckras jckras deleted the tabular branch November 1, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants