Interface ParameterMarkerStrategy

All Superinterfaces:
Serializable, Service
All Known Implementing Classes:
H2Dialect.OrdinalParameterMarkerStrategy

@SPI({IMPLEMENT,SUPPLY}) public interface ParameterMarkerStrategy extends Service

Generates parameter markers for prepared SQL statements.

A Dialect may supply a stable native-marker strategy when its database and selected driver support or require syntax such as $n or ?n. Return a complete marker for the one-based position and do not retain the supplied JDBC type. Hibernate uses the JDBC-standard ? strategy when the Dialect supply point returns null.

This contract was originally introduced for reactive PostgreSQL drivers which require native $n markers.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    createMarker(int position, JdbcType jdbcType)
    Create the complete marker for a one-based parameter position.
  • Method Details

    • createMarker

      String createMarker(int position, JdbcType jdbcType)
      Create the complete marker for a one-based parameter position.
      Parameters:
      position - the one-based parameter position
      jdbcType - the known JDBC type, or null