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

Q: Random Access Fields #102

Open
yaarix opened this issue Jul 7, 2021 · 0 comments
Open

Q: Random Access Fields #102

yaarix opened this issue Jul 7, 2021 · 0 comments

Comments

@yaarix
Copy link

yaarix commented Jul 7, 2021

Hi,
Im probably missing something, but im not sure i understand how random access of fields work in the java api (or in capnproto in general)
lets say i have the following schema:

struct Message {
  id @0 :UInt32;
  field1 @1 :Text;
  field2 @2 :Text;
  field3 @2 :Text;
  field4 @2 :Text;
  }

And during runtime, i might need to access only field1, and field3. how do i do that?
is it just magically happens when i do:
Message.getField1()?

Thanks!

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

No branches or pull requests

1 participant