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

Please add an example with serialization/deserialization of tuples #69

Open
mkhlsvn opened this issue Aug 31, 2023 · 2 comments
Open

Please add an example with serialization/deserialization of tuples #69

mkhlsvn opened this issue Aug 31, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@mkhlsvn
Copy link

mkhlsvn commented Aug 31, 2023

It is not clear how to correctly access edgedb functions that return or accept unnamed tuples of values as input

For example in schema I define the function function getRepayment(id: uuid, amount: decimal) -> optional tuple<decimal, decimal, decimal, decimal, decimal, decimal> how to query it?

@EncompassingResidential
Copy link

EncompassingResidential commented Sep 15, 2023

Hi, I'm new to EdgeDB and only several months into C#. Their one Readme file here has some examples of serializing and deserializing from your EdgeDB. It doesn't appear to have specifically a Tuple in it, but maybe that's why you are asking.

@quinchs
Copy link
Collaborator

quinchs commented Sep 20, 2023

You can use the System.Tuple<T..> or System.ValueTuple<T..> types as a result of your query:

await client.QuerySingleAsync<(decimal, decimal, decimal, decimal, decimal, decimal)>("...");

@raddevon raddevon added the documentation Improvements or additions to documentation label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants