Skip to content

add toRelLiteral (aka RelSON) #49

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

add toRelLiteral (aka RelSON) #49

wants to merge 5 commits into from

Conversation

vilterp
Copy link

@vilterp vilterp commented Aug 24, 2022

Copied from @denisgursky in Slack: https://relationalai.slack.com/archives/C02C9AV2LL9/p1661347284228579?thread_ts=1661274493.782329&cid=C02C9AV2LL9

image

TODO:

  • use getDisplayValue
  • ^Foo[…] for value types?
  • actually test, via roundtripping a big Rel literal

Co-Authored-By: Denis Gursky denis.gursky@relational.ai

Co-Authored-By: Denis Gursky <denis.gursky@relational.ai>
@vilterp vilterp changed the title add toRelLiteral (aka RelSON) add toRelLiteral (aka RelSON) Aug 24, 2022
@vilterp
Copy link
Author

vilterp commented Aug 24, 2022

@denisgursky, what was the API you mentioned in the call that this should use? toFormattedString or something?

@denisgursky
Copy link
Contributor

@denisgursky, what was the API you mentioned in the call that this should use? toFormattedString or something?

https://github.com/RelationalAI/rai-sdk-javascript/blob/main/src/results/resultUtils.ts#L462

@@ -462,6 +462,7 @@ export function convertValue<T extends RelTypedValue>(
export function getDisplayValue(
typeDef: RelTypeDef,
value: RelTypedValue['value'],
quoteStrings = false,
Copy link
Author

@vilterp vilterp Aug 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants