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

feat(derive): Add better string parsing support #155

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

GeekMasher
Copy link
Contributor

@GeekMasher GeekMasher commented Dec 6, 2024

This pull request includes several enhancements and new features to the geekorm-derive library. The most important changes involve adding new attribute keys, improving parsing logic, and extending support for additional data types and functionalities.

Enhancements to attribute keys and parsing logic:

  • geekorm-derive/src/attr.rs: Added new attribute keys (Key, Aliases, OnValidate, Disable) and updated the GeekAttribute struct to include a Vec<String> type. Improved parsing logic to handle these new keys and their respective values. [1] [2] [3] [4] [5] [6] [7]

Enhancements to ColumnDerive:

  • geekorm-derive/src/derive/column.rs: Added handling for the OnValidate attribute key to set the save and update properties accordingly. Updated logic to skip certain attribute keys (Key, Disable, Aliases). [1] [2]

Support for custom key attributes in enums:

  • geekorm-derive/src/lib.rs: Demonstrated usage of the key attribute in documentation comments and updated the data_derive function to include geekorm attributes. [1] [2]
  • geekorm-derive/src/parsers.rs: Added generate_strings function to support custom key attributes for enum variants, and integrated this function into the enum_parser. [1] [2]

Miscellaneous improvements:

@GeekMasher GeekMasher merged commit 09f1450 into main Dec 6, 2024
10 checks passed
@GeekMasher GeekMasher deleted the enum-string-magic branch December 6, 2024 20:19
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.

1 participant