Class: ParameterMetaData

$.db. ParameterMetaData

$.db.ParameterMetaData represents the metadata of a prepared statement

new ParameterMetaData()

Represents the metadata of a prepared statement

Methods

getParameterCount() → {integer}

Returns the number of the parameters in the prepared statement
Throws:
  • Throws an error if the object the method is being called on is not valid.
Returns:
The number of the parameters in the prepared statement
Type
integer

getParameterMode(index) → {integer}

Returns the mode of the specified parameter
Parameters:
Name Type Description
index integer The index of the parameter starting from 1
To Do:
  • provide an enumeration
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
The mode of the specified parameter
Type
integer

getParameterName(columnIndex) → {string}

Returns the name of the specified parameter
Parameters:
Name Type Description
columnIndex integer The index of the parameter in the prepared statement starting from 1
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
The name of the specified parameter
Type
string

getParameterType(columnIndex) → {$.db.types}

Returns the type ($.db.types) of the specified parameter
Parameters:
Name Type Description
columnIndex integer The index of the parameter in the prepared statement starting from 1
See:
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
The type
Type
$.db.types

getParameterTypeName(columnIndex) → {string}

Returns the type name of the specified parameter
Parameters:
Name Type Description
columnIndex integer is the index of the parameter in the prepared statement starting from 1
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
The type name of the specified parameter
Type
string

getPrecision(columnIndex) → {string}

Returns the designated parameter's number of decimal digits
Parameters:
Name Type Description
columnIndex integer The index of the parameter in the prepared statement starting from 1
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
The designated parameter's number of decimal digits
Type
string

getScale(columnIndex) → {string}

Returns the designated parameter's scale
Parameters:
Name Type Description
columnIndex integer The index of the parameter in the prepared statement starting from 1
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
The designated parameter's scale
Type
string

hasDefault(index) → {integer}

Checks if the specified parameter has a default value
Parameters:
Name Type Description
index integer The index of the parameter starting from 1
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
1: true, 0: false
Type
integer

isNullable(index) → {integer}

Checks if the specified parameter is nullable
Parameters:
Name Type Description
index integer The index of the parameter, starting from 1
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
1: true, 0: false
Type
integer

isSigned(index) → {integer}

Checks if the specified parameter is signed
Parameters:
Name Type Description
index integer The index of the parameter starting from 1
Throws:
  • Throws an error on invalid parameters or if the object the method is being called on is not valid.
Returns:
1: true, 0: false
Type
integer