Skip to content

When parsing, there is no way to get int value of an enum #7

@kennberg

Description

@kennberg

Right now when I parse a message in node, the enum value is set to string. However, string is not an efficient representation of enum. It takes longer to compare, it takes more space in the database, etc.

Possible solutions:

  1. Provide a mapping from string to int.
  2. Set option to always return int for enums.
  3. Generate a simple module that contains constants for all the enums in the protobuf.

Solutions #2 + #3 are likely to generate the nicest and most efficient server-side code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions