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

Provide a way to modify metadata properties #847

Open
davidalk opened this issue Sep 24, 2024 · 0 comments
Open

Provide a way to modify metadata properties #847

davidalk opened this issue Sep 24, 2024 · 0 comments
Labels
enhancement New feature or request subject: syntax This issue is about the syntax of Rosetta

Comments

@davidalk
Copy link
Contributor

davidalk commented Sep 24, 2024

This proposal suggests a way we can modify a property that has metadata on it. Currently any properties that have metadata on them do not let you set that metadata using a set operator for example. The following proposed syntax would allow you to do that task:

func MyFunc:
	output:
		result string (1..1)
			[metadata scheme]
	set result:  "someValue"
	set result -> scheme: "someScheme"	

In addition to the above syntax we could also add a new with-meta operator which would allow you to make use of the constructor syntax when setting metadata. This would be especially useful when setting multiple metadata properties, see the following example:

func MyFunc:
	output:
		result string (1..1)
			[metadata scheme]
                        [metadata reference]
	set result:  "someValue" with-meta {
				  scheme: "someScheme",
                                  reference: "someReference"             
			    }
@SimonCockx SimonCockx added enhancement New feature or request subject: syntax This issue is about the syntax of Rosetta labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request subject: syntax This issue is about the syntax of Rosetta
Projects
None yet
Development

No branches or pull requests

2 participants