Class R2dbcQueryStatement

java.lang.Object
io.micronaut.data.r2dbc.mapper.R2dbcQueryStatement
All Implemented Interfaces:
QueryStatement<io.r2dbc.spi.Statement,Integer>

public class R2dbcQueryStatement extends Object implements QueryStatement<io.r2dbc.spi.Statement,Integer>
Implementation of QueryStatement for R2DBC.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • R2dbcQueryStatement

      public R2dbcQueryStatement()
    • R2dbcQueryStatement

      public R2dbcQueryStatement(DataConversionService conversionService)
      Constructs a new instance.
      Parameters:
      conversionService - The data conversion service
      Since:
      3.1
  • Method Details

    • getConversionService

      public io.micronaut.core.convert.ConversionService getConversionService()
      Description copied from interface: QueryStatement
      Get conversion service.
      Specified by:
      getConversionService in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Returns:
      the instance of ConversionService
    • setDynamic

      public QueryStatement<io.r2dbc.spi.Statement,Integer> setDynamic(@NonNull @NonNull io.r2dbc.spi.Statement statement, @NonNull @NonNull Integer index, @NonNull @NonNull DataType dataType, Object value)
      Description copied from interface: QueryStatement
      Write a value dynamically using the result set and the given name and data type.
      Specified by:
      setDynamic in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      index - The index
      dataType - The data type
      value - the value
      Returns:
      The writer
    • setValue

      public QueryStatement<io.r2dbc.spi.Statement,Integer> setValue(io.r2dbc.spi.Statement statement, Integer index, Object value) throws DataAccessException
      Description copied from interface: QueryStatement
      Sets the give given object value.
      Specified by:
      setValue in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      index - The index
      value - The value
      Returns:
      this writer
      Throws:
      DataAccessException - if the value cannot be read
    • convertRequired

      @Nullable public <T> T convertRequired(@Nullable @Nullable Object value, Class<T> type)
      Description copied from interface: QueryStatement
      Convert the value to the given type.
      Specified by:
      convertRequired in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Type Parameters:
      T - The generic type
      Parameters:
      value - The value
      type - The type
      Returns:
      The converted value
    • setLong

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setLong(io.r2dbc.spi.Statement statement, Integer name, long value)
      Description copied from interface: QueryStatement
      Write a long value for the given name.
      Specified by:
      setLong in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      value - The value
      Returns:
      This writer
    • setChar

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setChar(io.r2dbc.spi.Statement statement, Integer name, char value)
      Description copied from interface: QueryStatement
      Write a char value for the given name.
      Specified by:
      setChar in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      value - The char value
      Returns:
      This writer
    • setDate

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setDate(io.r2dbc.spi.Statement statement, Integer name, Date date)
      Description copied from interface: QueryStatement
      Write a date value for the given name.
      Specified by:
      setDate in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      date - The date
      Returns:
      This writer
    • setTimestamp

      public QueryStatement<io.r2dbc.spi.Statement,Integer> setTimestamp(io.r2dbc.spi.Statement statement, Integer name, Instant instant)
      Description copied from interface: QueryStatement
      Write an instant value for the given name.
      Specified by:
      setTimestamp in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      instant - The instant
      Returns:
      This writer
    • setTime

      public QueryStatement<io.r2dbc.spi.Statement,Integer> setTime(io.r2dbc.spi.Statement statement, Integer name, Time instant)
      Description copied from interface: QueryStatement
      Write an instant value for the given name.
      Specified by:
      setTime in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      instant - The time
      Returns:
      This writer
    • setString

      public QueryStatement<io.r2dbc.spi.Statement,Integer> setString(io.r2dbc.spi.Statement statement, Integer name, String string)
      Description copied from interface: QueryStatement
      Write a string value for the given name.
      Specified by:
      setString in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      string - The string
      Returns:
      This writer
    • setInt

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setInt(io.r2dbc.spi.Statement statement, Integer name, int integer)
      Description copied from interface: QueryStatement
      Write a int value for the given name.
      Specified by:
      setInt in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      integer - The integer
      Returns:
      This writer
    • setBoolean

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setBoolean(io.r2dbc.spi.Statement statement, Integer name, boolean bool)
      Description copied from interface: QueryStatement
      Write a boolean value for the given name.
      Specified by:
      setBoolean in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      bool - The boolean
      Returns:
      This writer
    • setFloat

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setFloat(io.r2dbc.spi.Statement statement, Integer name, float f)
      Description copied from interface: QueryStatement
      Write a float value for the given name.
      Specified by:
      setFloat in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      f - The float
      Returns:
      This writer
    • setByte

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setByte(io.r2dbc.spi.Statement statement, Integer name, byte b)
      Description copied from interface: QueryStatement
      Write a byte value for the given name.
      Specified by:
      setByte in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      b - The byte
      Returns:
      This writer
    • setShort

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setShort(io.r2dbc.spi.Statement statement, Integer name, short s)
      Description copied from interface: QueryStatement
      Write a short value for the given name.
      Specified by:
      setShort in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      s - The short
      Returns:
      This writer
    • setDouble

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setDouble(io.r2dbc.spi.Statement statement, Integer name, double d)
      Description copied from interface: QueryStatement
      Write a double value for the given name.
      Specified by:
      setDouble in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      d - The double
      Returns:
      This writer
    • setBigDecimal

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setBigDecimal(io.r2dbc.spi.Statement statement, Integer name, BigDecimal bd)
      Description copied from interface: QueryStatement
      Write a BigDecimal value for the given name.
      Specified by:
      setBigDecimal in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      bd - The big decimal
      Returns:
      This writer
    • setBytes

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setBytes(io.r2dbc.spi.Statement statement, Integer name, byte[] bytes)
      Description copied from interface: QueryStatement
      Write a byte[] value for the given name.
      Specified by:
      setBytes in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      bytes - the bytes
      Returns:
      This writer
    • setArray

      @NonNull public @NonNull QueryStatement<io.r2dbc.spi.Statement,Integer> setArray(io.r2dbc.spi.Statement statement, Integer name, Object array)
      Description copied from interface: QueryStatement
      Sets an array value for the given name.
      Specified by:
      setArray in interface QueryStatement<io.r2dbc.spi.Statement,Integer>
      Parameters:
      statement - The statement
      name - The name (such as the column name)
      array - the array
      Returns:
      This writer