Skip to content

add toRelLiteral (aka RelSON)#49

Draft
vilterp wants to merge 5 commits into
mainfrom
relson
Draft

add toRelLiteral (aka RelSON)#49
vilterp wants to merge 5 commits into
mainfrom
relson

Conversation

@vilterp

@vilterp vilterp commented Aug 24, 2022

Copy link
Copy Markdown

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

vilterp commented Aug 24, 2022

Copy link
Copy Markdown
Author

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

@denisgursky

Copy link
Copy Markdown
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

export function getDisplayValue(
typeDef: RelTypeDef,
value: RelTypedValue['value'],
quoteStrings = false,

@vilterp vilterp Aug 24, 2022

Copy link
Copy Markdown
Author

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