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

Make ColumnIndexAttribute bitflags in the ABI #212

Merged
merged 1 commit into from
Aug 29, 2023
Merged

Commits on Aug 21, 2023

  1. Make ColumnIndexAttribute bitflags in the ABI

    As we're adding more variants, it's getting harder to keep track of the "A implies B" relationships between enum variants and to correctly do checks like "is this column autoinc" in different places.
    
    Using bitflags makes expressing those relationships more natural and checking simpler - e.g. you can just do `contains(AUTO_INC)` as a single bit operation instead of having to remember and list all possible variants that imply autoinc, especially if we're going to add more flags in the future.
    
    Initially I was going to make this change just in C# module generator and convert between ABI enum and bitflags over there, but it seems better to do this at ABI level so it simplifies Rust handling as well.
    RReverser committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    a6af9e5 View commit details
    Browse the repository at this point in the history