Class JdbcParameterMetaData

  • JdbcParameterMetaData provides metadata about the parameters of a prepared statement.

  • It offers methods to retrieve information such as parameter count, type, mode, class name, precision, scale, nullability, and signed status.

  • Detailed documentation for each method is available, referencing the correspondingjava.sql.ParameterMetaData methods.

  • Each method requires authorization with thehttps://www.googleapis.com/auth/script.external_request scope.

JdbcParameterMetaData

A JDBCParameterMetaData. For documentation of this class, seejava.sql.ParameterMetaData.

Methods

MethodReturn typeBrief description
getParameterClassName(param)StringFor documentation of this method, seejava.sql.ParameterMetaData#getParameterClassName(int).
getParameterCount()IntegerFor documentation of this method, seejava.sql.ParameterMetaData#getParameterCount().
getParameterMode(param)IntegerFor documentation of this method, seejava.sql.ParameterMetaData#getParameterMode(int).
getParameterType(param)IntegerFor documentation of this method, seejava.sql.ParameterMetaData#getParameterType(int).
getParameterTypeName(param)StringFor documentation of this method, seejava.sql.ParameterMetaData#getParameterTypeName(int).
getPrecision(param)IntegerFor documentation of this method, seejava.sql.ParameterMetaData#getPrecision(int).
getScale(param)IntegerFor documentation of this method, seejava.sql.ParameterMetaData#getScale(int).
isNullable(param)IntegerFor documentation of this method, seejava.sql.ParameterMetaData#isNullable(int).
isSigned(param)BooleanFor documentation of this method, seejava.sql.ParameterMetaData#isSigned(int).

Detailed documentation

getParameterClassName(param)

For documentation of this method, seejava.sql.ParameterMetaData#getParameterClassName(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

String — The fully-qualified Java class name that is used by theJdbcPreparedStatement.setObject(index, x) methods.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getParameterCount()

For documentation of this method, seejava.sql.ParameterMetaData#getParameterCount().

Return

Integer — The number of parameters for which this metadata contains information.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getParameterMode(param)

For documentation of this method, seejava.sql.ParameterMetaData#getParameterMode(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

Integer — The designated parameter's mode, which is one ofJdbc.ParameterMetaData.parameterModeIn,Jdbc.ParameterMetaData.parameterModeOut,Jdbc.ParameterMetaData.parameterModeInOut, orJdbc.ParameterMetaData.parameterModeUnknown.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getParameterType(param)

For documentation of this method, seejava.sql.ParameterMetaData#getParameterType(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

Integer — The designated parameter'sSQL type.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getParameterTypeName(param)

For documentation of this method, seejava.sql.ParameterMetaData#getParameterTypeName(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

String — The designated parameter's database-specific type name. This is a fully-qualified type name if the parameter is a user-defined type.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getPrecision(param)

For documentation of this method, seejava.sql.ParameterMetaData#getPrecision(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

Integer — The maximum column size for the given parameter. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime data, this is the length in characters of the string representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For theROWID datatype, this is the length in bytes. Returns 0 for types where the column size is not applicable.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getScale(param)

For documentation of this method, seejava.sql.ParameterMetaData#getScale(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

Integer — The designated parameter's number of digits to right of the decimal point. Returns 0 for data types where the scale is not applicable.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

isNullable(param)

For documentation of this method, seejava.sql.ParameterMetaData#isNullable(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

Integer — The nullability status of the given parameter; one ofJdbc.ParameterMetaData.parameterNoNulls,Jdbc.ParameterMetaData.parameterNullable, orJdbc.ParameterMetaData.parameterNullableUnknown.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

isSigned(param)

For documentation of this method, seejava.sql.ParameterMetaData#isSigned(int).

Parameters

NameTypeDescription
paramIntegerThe index of the parameter to examine. The first parameter has an index of 1.

Return

Booleantrue if the specified parameter can accept signed number values;false otherwise.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.