Skip to content

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 [email protected]

Co-Authored-By: Denis Gursky <[email protected]>
@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