Add support for x'HEX' and X'HEX' Numeric Constants in SQLite by RubieV · Pull Request #582 · JSQLParser/JSqlParser

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@RubieV

Copy link Copy Markdown

@RubieV RubieV commented

Feb 8, 2018

Currently, only x'HEX' numeric constants are supported. SQLite supports X'HEX' as well, as "string literals containing hexadecimal data"

Currently, only x'HEX' numeric constants are supported. SQLite supports X'HEX' as well, as "string literals containing hexadecimal data"

@coveralls

Copy link Copy Markdown

Coverage Status

Coverage remained the same at 87.046% when pulling ccccedf on bitsensor:master into d5ec2fe on JSQLParser:master.

1 similar comment

@coveralls

Copy link Copy Markdown

Coverage Status

Coverage remained the same at 87.046% when pulling ccccedf on bitsensor:master into d5ec2fe on JSQLParser:master.

| < S_LONG: ( <DIGIT> )+ >
| < #DIGIT: ["0" - "9"] >
| < S_HEX: ("x'" ( <HEX_VALUE> )+ "'" | "0x" ( <HEX_VALUE> )+ ) >
| < S_HEX: (["x","X"] "'" ( <HEX_VALUE> )+ "'" | "0x" ( <HEX_VALUE> )+ ) >
Copy link Copy Markdown

Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since javacc builds case insensitive parser, this change is not necessary. I also included a test for this and it succeeded.

@RubieV

Copy link Copy Markdown

Author

RubieV commented

Feb 9, 2018

Sorry for the inconvenience, this is indeed the case. I must have been running an older version of JSqlParser.

@RubieV RubieV closed this

Feb 9, 2018

@wumpz

Copy link Copy Markdown

Member

wumpz commented

Feb 9, 2018

No problem. Thx for using JSqlParser.

Cheers Tobias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@wumpz wumpz wumpz left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@RubieV @coveralls @wumpz