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

Can you help add feature support type UUID, DateTime, Decimal and Interval #2

Open
measproem opened this issue May 15, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@measproem
Copy link

Because Tarantool has format MP_EXT abit of type UUID, DateTime, Decimal and Interval can you help add those features
Thanks

@Flowneee
Copy link
Owner

Can you elaborate where exactly that should be supported?

Currently all de/serialization is done via rmpv::Value. You can serialize any data into Ext. I can probably add some utility functions to do just that. But I don't know whether they support deserialization from such format or not, and I don't know would it be possible to add that support without PR into rmpv.

In future probably it would be a good idea to move from rmpv to something custom, but I am not sure when that would happen.

@measproem
Copy link
Author

Types UUID, DateTime, Decimal and Interval good in some use case like API enpoint expose URL end point to end user for security, Decimal for financial system..,
There are two challenges:

  1. Serialize pack send request to Tarantool any space field type: UUI, DATETIME, DECIMAL need to follow officail document Tarantool MessagePack extensions
  2. Deserialize when get response from Tarantool need implement follow requirement too

@Flowneee Flowneee added enhancement New feature or request help wanted Extra attention is needed labels May 16, 2023
@Flowneee
Copy link
Owner

Well, then my answer is right, it is possible to implement some helpers for serialization, but deserialization is much more complicated. I am not sure that even moving to https://github.com/3Hren/msgpack-rust/tree/master/rmp-serde would help. Probably both rmp-serde and in rmpv would require some additional logic hidden behind feature (but I doubt they would agree to some DB-specific extensions).

@measproem
Copy link
Author

Thank you

@Flowneee Flowneee added this to the 0.1.0 milestone Sep 4, 2023
@Flowneee
Copy link
Owner

Flowneee commented Jan 6, 2025

As a temporary (lol) workaround you can use this code for UUID (and similar approach for other types) #14 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants