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

Issue #2213 - PostgreSQL: Strict typing requires explicit type casts #2234

Merged
merged 61 commits into from
Aug 19, 2024

Commits on Mar 20, 2024

  1. Configuration menu
    Copy the full SHA
    8a2fbf6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d87e12b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7a3358a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7e15720 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. #2213 Enrich EqlDomainMetadata with the active Hibernate dialect in…

    …formation
    
    Field `dbVersion: DbVersion` was removed due to it being inferable from
    a `Dialect` instance.
    
    This change provides access to more information about the active SQL
    dialect. For example, we get access to Hibernate's knowledge of SQL type
    names, which is required to solve the problem described in this issue.
    homedirectory committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    f3edd9d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a108fb0 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. #2213 Modify IGenerateSql#sql() to accept EqlDomainMetadata inste…

    …ad of `DbVersion`
    homedirectory committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    9ddcc21 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2959025 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6baadb8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    46fb478 View commit details
    Browse the repository at this point in the history
  5. #2213 General code cleanup

    * Increase immutability
    * Be concise
    * Add documentation and comments
    homedirectory committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    c52e116 View commit details
    Browse the repository at this point in the history
  6. #2213 Always use generic SQL type names in type casts

    Needed additional code to overcome limitations of Hibernate
    homedirectory committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    2405201 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    006268a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6f7ee5a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    95dc9d0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7de9742 View commit details
    Browse the repository at this point in the history
  11. #2213 Replace null as placeholder with a reserved instance

    Null is a bad idea
    homedirectory committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    0561a48 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. Configuration menu
    Copy the full SHA
    ed3926f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cfdadf0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bf36ce3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    516ea29 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2024

  1. Make StreamUtils#zip accept a wider range of streams

    E.g., IntStream, LongStream, DoubleStream
    homedirectory committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    3d91a16 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1fc0682 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2024

  1. Configuration menu
    Copy the full SHA
    6a8a803 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Configuration menu
    Copy the full SHA
    1bb3a85 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    26ba776 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6810d6 View commit details
    Browse the repository at this point in the history
  4. #2213 Represent the null PropType with a reserved instance instead of…

    … literal null
    
    Programming with nulls is undesirable.
    homedirectory committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    2255bbc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    51ea4aa View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. #2213 Use unique Hibernate placeholder types instead of a singleton

    This is to avoid 2 placeholder types from different contexts
    being accidentally considered equal.
    homedirectory committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    e454d04 View commit details
    Browse the repository at this point in the history
  2. #2213 Various minor improvements

    - Add documentation
    - Implement toString() methods to facilitate reasoning
    - Reduce visibility of PropType constructor (static method should be used)
    homedirectory committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    f896e92 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4554d6e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9186ba9 View commit details
    Browse the repository at this point in the history
  5. #2213 Make NULL compatible with the other value in comparison express…

    …ions
    
    This is achieved by casting the NULL to the type of the other operand
    homedirectory committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    643a678 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dafb82e View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Configuration menu
    Copy the full SHA
    ffc1bf4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4416374 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b9a920 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c5c48a1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8a073a1 View commit details
    Browse the repository at this point in the history
  6. #2213 Test erroneous union queries with different numbers of yields

    In general, this approach of asserting that an exception is thrown is
    far from the best because it ignores potential exceptions that may be
    thrown for unexpected reasons. Being more specific and expecting only a
    certain type of exceptions doesn't work either since the exception gets
    rethrown at some higher level, effectively becoming a cause of another
    exception. Should we be making assertions about the stack trace at this
    point? I don't think so.
    homedirectory committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    e9c8823 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. #2213 Refactor getConvertToStringSql* using a clearly defined interface

    The converstion itself was also slightly modified:
    * Use an unbounded VARCHAR by default instead of setting the limit to
      255 chars, which has no clear basis.
    * Optimise for Integers by limiting the VARCHAR length to 10 chars.
    homedirectory committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    5945557 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea4657a View commit details
    Browse the repository at this point in the history
  3. #2213 Support all types of values in the left-hand side of LIKE

    And for all DB back-ends, not just PostgreSQL and SQL Server.
    homedirectory committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    35aaebe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d66ca0c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1fa0b56 View commit details
    Browse the repository at this point in the history
  6. #2213 Remove EQL2 workarouond for caseWhen that represented null type…

    … with string type
    
    Wheels of EQL3 are turning so the workaround is no longer needed.
    Moreover, we can now be confident that the null type is never taken for
    the string type by mistake, which is vastly important for PostgreSQL.
    homedirectory committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    20417a7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a5b7f85 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4636dd6 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. Configuration menu
    Copy the full SHA
    1629bcd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a6c0035 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ca6d9c View commit details
    Browse the repository at this point in the history
  4. #2213 Refactor type casting facility of caseWhen

    * Use a sealed interface with inner classes to facilitate pattern
      matching with switch.
    * Instead of inserting type casts conditionally, depending on the
      database, always insert them. The conditional approach likely relied
      on implicit type conversion performed by some DBs. Although,
      endAsInt() worked correctly only with H2, which had gone unnoticed as
      its usage has been scarce.
    homedirectory committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    86986a3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6ddd6c7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    93d0ebb View commit details
    Browse the repository at this point in the history
  7. #2213 Use a better suited assertion for empty lists

    This assertion reports list contents in case of failure.
    homedirectory committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    98c65af View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. Configuration menu
    Copy the full SHA
    73f609d View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. #2213 Merged with 2.0.0-SNAPSHOT.

    01es committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    aceec3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1841303 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b7d23eb View commit details
    Browse the repository at this point in the history
  4. #2213 Minor tidy up.

    01es committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    5708463 View commit details
    Browse the repository at this point in the history