We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be great if UUIDs were interpreted using Julia's UUID type.
This works, but probably not the mot efficient way:
postgres=# create table t (x uuid); CREATE TABLE postgres=# insert into t values(uuid_in(md5(random()::text || random()::text)::cstring)); INSERT 0 1 postgres=# insert into t values(uuid_in(md5(random()::text || random()::text)::cstring)); INSERT 0 1 postgres=# insert into t values(uuid_in(md5(random()::text || random()::text)::cstring)); INSERT 0 1 postgres=# select * from t; x -------------------------------------- b8445ef2-ed8e-b4dd-c5da-c5097155a45c ed7676b9-f78f-c2f1-84d5-a6267485cd4a 77ca6bf5-7621-bc8a-034c-1a853a97b516
julia> t = LibPQ.execute(c, "select * from t", binary_format=true, not_null=true) |> Tables.columntable (x = ["\xb8D^\xf2펴\xdd\xc5\xda\xc5\tqU\xa4\\", "\xedvv\xb9\xf7\x8f\xc2\xf1\x84զ&t\x85\xcdJ", "w\xcak\xf5v!\xbc\x8a\x03L\x1a\x85:\x97\xb5\x16"],) julia> [reinterpret(UUIDs.UUID, reverse(Vector{UInt8}(x)))[1] for x in t.x] 3-element Vector{Base.UUID}: UUID("b8445ef2-ed8e-b4dd-c5da-c5097155a45c") UUID("ed7676b9-f78f-c2f1-84d5-a6267485cd4a") UUID("77ca6bf5-7621-bc8a-034c-1a853a97b516")
The text was updated successfully, but these errors were encountered:
Thanks for this example, that's a great reference for implementation!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
It would be great if UUIDs were interpreted using Julia's UUID type.
This works, but probably not the mot efficient way:
The text was updated successfully, but these errors were encountered: