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 }}
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.
I'm using Cassandra with OrientDB in one system and have to handle uuid<->string conversions throughout the app having to store as a string in OrientDB, while using native uuid/timeuuid in Cassandra.
It would be great to be able to use actual UUID type with queries, not a string value.
Currently:
There's an error if I'm trying to bind a UUID value, ex.
...Command(orient.NewSQLCommand(INSERT INTO Users SET userID = ?, p.UserID))
Workaround is to convert to a string manually:
....Command(orient.NewSQLCommand(INSERT INTO Users SET userID = ?, p.UserID.String()))
On reading from a query, need to read as a string value and then to parse into UUID again, ex. uuid.Parse(uuidStr).
Thank you,
D.
The text was updated successfully, but these errors were encountered:
For case 3 you can use RegisterMapDecoderHook to provide function that can converts strings to UUID type (or vice versa). This will help to decode Documents to maps/structs with UUID. Still, Documents itself will contain raw string values.
For case 1-2 I think the right way will be to allow conversion to string via TextMarshaler interface. Does the package you are using provides implementation for this interface?
Hi,
I'm using Cassandra with OrientDB in one system and have to handle uuid<->string conversions throughout the app having to store as a string in OrientDB, while using native uuid/timeuuid in Cassandra.
It would be great to be able to use actual UUID type with queries, not a string value.
Currently:
...Command(orient.NewSQLCommand(
INSERT INTO Users SET userID = ?
, p.UserID))....Command(orient.NewSQLCommand(
INSERT INTO Users SET userID = ?
, p.UserID.String()))Thank you,
D.
The text was updated successfully, but these errors were encountered: