Skip to content

Hexadecimal-Encoded String and Int Literals #377

@jseldess

Description

@jseldess

See cockroachdb/cockroach#7138

Add Hexadecimal-Encoded Strings to strings.md and Hexadecimal-Encoded Ints to int.md.

From chat with @jordanlewis:

It seems like the best place for it would be a new stanza below String Literal and Escape String called Hexadecimal-Encoded String Literal or something of that sort

[10:02]  
mysql calls them “hex literals” but for us they’re always strings

[10:02]  
https://dev.mysql.com/doc/refman/5.7/en/hexadecimal-literals.html

[10:02]  
well, the x’blah’ style is a string, and the 0xblah thing we already support are always numbers

Jesse Seldess [10:03 PM]  
I see. so 0xblah is already a valid format for integers?

Jordan Lewis [10:03 PM]  
yes

Jesse Seldess [10:03 PM]  
ok, so that's a doc to update then.

Jordan Lewis [10:03 PM]  
maybe not documented yet? i haven’t taken a good look at the docs yet

[10:03]  
yeah

Jesse Seldess [10:04 PM]  
Yeah, docs say `INT` format is just a literal number: https://www.cockroachlabs.com/docs/int.html#format

[10:04]  
So we can add an alternative.

Jordan Lewis [10:06 PM]  
sounds good

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions