Class MonetParameterMetaData

java.lang.Object
org.monetdb.monetdbe.MonetWrapper
org.monetdb.monetdbe.MonetParameterMetaData
All Implemented Interfaces:
ParameterMetaData, Wrapper

public class MonetParameterMetaData
extends MonetWrapper
implements ParameterMetaData
A ParameterMetaData suitable for the MonetDB embedded database. An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement object.
  • Field Details

    • parameterCount

      protected final int parameterCount
      Number of parameters
    • types

      protected final int[] types
      The MonetDB types of the parameters as integers
    • monetTypes

      protected final String[] monetTypes
      The MonetDB types of the parameters as strings
    • sqlTypes

      protected final int[] sqlTypes
      The JDBC SQL types of the parameters
  • Method Details

    • getParameterCount

      public int getParameterCount() throws SQLException
      Retrieves the number of parameters in the PreparedStatement object for which this ParameterMetaData object contains information.
      Specified by:
      getParameterCount in interface ParameterMetaData
      Returns:
      the number of parameters
      Throws:
      SQLException
    • isNullable

      public int isNullable​(int param) throws SQLException
      Retrieves whether null values are allowed in the designated parameter. Currently not supported.
      Specified by:
      isNullable in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      the nullability status of the given parameter; one of ParameterMetaData.parameterNoNulls, ParameterMetaData.parameterNullable, or ParameterMetaData.parameterNullableUnknown
      Throws:
      SQLException
    • isSigned

      public boolean isSigned​(int param) throws SQLException
      Retrieves whether values for the designated parameter can be signed numbers.
      Specified by:
      isSigned in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      true if so; false otherwise
      Throws:
      SQLException
    • getPrecision

      public int getPrecision​(int param) throws SQLException
      Retrieves the designated parameter's specified column size. The returned value represents the maximum column size for the given parameter.
      Specified by:
      getPrecision in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      precision
      Throws:
      SQLException
    • getScale

      public int getScale​(int param) throws SQLException
      Retrieves the designated parameter's number of digits to right of the decimal point. Currently not supported.
      Specified by:
      getScale in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      scale
      Throws:
      SQLException
    • getParameterType

      public int getParameterType​(int param) throws SQLException
      Retrieves the designated parameter's SQL type.
      Specified by:
      getParameterType in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      SQL type from java.sql.Types
      Throws:
      SQLException - if the column parameter is out of bounds
    • getParameterTypeName

      public String getParameterTypeName​(int param) throws SQLException
      Retrieves the designated parameter's MonetDBe type name as a String.
      Specified by:
      getParameterTypeName in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      MonetDBe type
      Throws:
      SQLException - if the column parameter is out of bounds
    • getParameterClassName

      public String getParameterClassName​(int param) throws SQLException
      Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
      Specified by:
      getParameterClassName in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column
      Throws:
      SQLException - if the column parameter is out of bounds
    • getParameterMode

      public int getParameterMode​(int param) throws SQLException
      Retrieves the designated parameter's mode. MonetDB doesn't support OUT parameters, so we return ParameterMetaData.parameterModeIn always.
      Specified by:
      getParameterMode in interface ParameterMetaData
      Parameters:
      param - Parameter number (starts at 1)
      Returns:
      ParameterMetaData.parameterModeIn
      Throws:
      SQLException