[hibernate-commits] [hibernate/hibernate-orm] ddaff2: Add hexadecimal binary literals with standard SQL ...

Gavin King noreply at github.com
Wed Feb 5 10:33:11 EST 2020


  Branch: refs/heads/wip/6.0
  Home:   https://github.com/hibernate/hibernate-orm
  Commit: ddaff288386346563182f6229a9df98d5d8026d5
      https://github.com/hibernate/hibernate-orm/commit/ddaff288386346563182f6229a9df98d5d8026d5
  Author: gavinking <gavin at ceylon-lang.org>
  Date:   2020-02-05 (Wed, 05 Feb 2020)

  Changed paths:
    M hibernate-core/src/main/antlr/org/hibernate/grammars/hql/HqlLexer.g4
    M hibernate-core/src/main/antlr/org/hibernate/grammars/hql/HqlParser.g4
    M hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
    M hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java
    M hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDialect.java
    M hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java
    M hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java
    M hibernate-core/src/main/java/org/hibernate/type/descriptor/java/ByteArrayTypeDescriptor.java
    M hibernate-core/src/main/java/org/hibernate/type/descriptor/java/PrimitiveByteArrayTypeDescriptor.java
    M hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/JdbcLiteralFormatter.java
    M hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/VarbinaryTypeDescriptor.java
    A hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/internal/JdbcLiteralFormatterBinary.java
    M hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/LiteralTests.java

  Log Message:
  -----------
  Add hexadecimal binary literals with standard SQL syntax

And fix up the parsing and formatting in VarbinaryTypeDescriptor which
was inconsistent with how the JDBC drivers handle the conversion to
signed bytes.


  Commit: cb3560de9626c6ad924c152053e5e0ed3b6196ad
      https://github.com/hibernate/hibernate-orm/commit/cb3560de9626c6ad924c152053e5e0ed3b6196ad
  Author: gavinking <gavin at ceylon-lang.org>
  Date:   2020-02-05 (Wed, 05 Feb 2020)

  Changed paths:
    M hibernate-core/src/main/antlr/org/hibernate/grammars/hql/HqlParser.g4
    M hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java
    M hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/LiteralTests.java

  Log Message:
  -----------
  Allow binary literals to be specified in a Java byte-array-like format

Allow you to write x'DEADBEEF' as {0xDE, 0xAD, 0xBE, 0xEF}.

For now I'm being quite restrictive here:

- byte literals must be written in hexadecimal not in decimal
- they must be exactly two digits in length

(I would like to allow decimal format but I think that would start to
collide with other rules with braces in the grammar.)


Compare: https://github.com/hibernate/hibernate-orm/compare/eb4373465895...cb3560de9626


More information about the hibernate-commits mailing list