Skip to content

Implemented SQL simple enum string literal parsing #2844

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

egormanga
Copy link

Description of Changes

Ditto #2843.

enum TestKind {
	OptionA,
	OptionB,
}

#[table(name=test)]
struct Test {
	kind: TestKind,
}
SELECT * FROM test WHERE kind = 'OptionB';

This PR implements simple enum support for = and != operators (subject to further expansion).

Note: still doesn't work with enum_stringify case conversion OOTB. No clue how to implement that yet.

API and ABI breaking changes

None.

Expected complexity level and risk

1.

Testing

  • Manual testing using custom enum columns.
  • Needs unit tests. I leave this open for contributions or as an exercise to the employees.

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