Package org.monetdb.monetdbe
Class MonetResultSetMetaData
java.lang.Object
org.monetdb.monetdbe.MonetWrapper
org.monetdb.monetdbe.MonetResultSetMetaData
- All Implemented Interfaces:
ResultSetMetaData,Wrapper
public class MonetResultSetMetaData extends MonetWrapper implements ResultSetMetaData
A
ResultSetMetaData suitable for the MonetDB embedded database.
An object that can be used to get information about the types and properties of the columns in a ResultSet object.-
Field Summary
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown -
Method Summary
Modifier and Type Method Description StringgetCatalogName(int column)Gets the designated column's table's catalog name.StringgetColumnClassName(int column)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.intgetColumnCount()Returns the number of columns in this ResultSet object.intgetColumnDisplaySize(int column)Indicates the designated column's normal maximum width in characters.StringgetColumnLabel(int column)Gets the designated column's suggested title for use in printouts and displays.StringgetColumnName(int column)Get the designated column's name.intgetColumnType(int column)Retrieves the designated column's SQL type.intgetColumnTypeInt(int column)Retrieves the designated column's MonetDBe type name as an integer.StringgetColumnTypeName(int column)Retrieves the designated column's MonetDBe type name as a String.protected String[]getNames()Returns the column names of the ResultSet.intgetPrecision(int column)Get the designated column's specified column size.intgetScale(int column)Gets the designated column's number of digits to right of the decimal point.StringgetSchemaName(int column)Get the designated column's table's schema.StringgetTableName(int column)Gets the designated column's table name.booleanisAutoIncrement(int column)Indicates whether the designated column is automatically numbered.booleanisCaseSensitive(int column)Indicates whether a column's case matters.booleanisCurrency(int column)Indicates whether the designated column is a cash value.booleanisDefinitelyWritable(int column)Indicates whether a write on the designated column will definitely succeed.intisNullable(int column)Indicates the nullability of values in the designated column.booleanisReadOnly(int column)Indicates whether the designated column is definitely not writable.booleanisSearchable(int column)Indicates whether the designated column can be used in a where clause.booleanisSigned(int column)Indicates whether values in the designated column are signed numbers.booleanisWritable(int column)Indicates whether it is possible for a write on the designated column to succeed.
-
Method Details
-
getNames
Returns the column names of the ResultSet. Used forfindColumn(String).- Returns:
- Array of Strings with column names.
-
getColumnCount
Returns the number of columns in this ResultSet object.- Specified by:
getColumnCountin interfaceResultSetMetaData- Returns:
- The number of columns.
- Throws:
SQLException
-
isAutoIncrement
Indicates whether the designated column is automatically numbered. Currently not supported.- Specified by:
isAutoIncrementin interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- true if so; false otherwise
- Throws:
SQLException
-
isCaseSensitive
Indicates whether a column's case matters.- Specified by:
isCaseSensitivein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- true for all character string columns, else false
- Throws:
SQLException
-
isSearchable
Indicates whether the designated column can be used in a where clause. Because all columns can be used in a where clause, we return always true.- Specified by:
isSearchablein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- true
- Throws:
SQLException
-
isCurrency
Indicates whether the designated column is a cash value. From the MonetDB database perspective it is by definition unknown whether the value is a currency, so we return false here.- Specified by:
isCurrencyin interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- false
- Throws:
SQLException
-
isNullable
Indicates the nullability of values in the designated column. Currently not supported.- Specified by:
isNullablein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- true if so; false otherwise
- Throws:
SQLException
-
isSigned
Indicates whether values in the designated column are signed numbers. Within MonetDB all numeric types are signed.- Specified by:
isSignedin interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- true if so; false otherwise
- Throws:
SQLException
-
getColumnDisplaySize
Indicates the designated column's normal maximum width in characters. Currently not supported.- Specified by:
getColumnDisplaySizein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- the normal maximum number of characters allowed as the width of the designated column
- Throws:
SQLException
-
getColumnLabel
Gets the designated column's suggested title for use in printouts and displays.- Specified by:
getColumnLabelin interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- the suggested column title
- Throws:
SQLException- if the column parameter is out of bounds
-
getColumnName
Get the designated column's name.- Specified by:
getColumnNamein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- column name
- Throws:
SQLException- if the column parameter is out of bounds
-
getSchemaName
Get the designated column's table's schema.- Specified by:
getSchemaNamein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- schema name or "" if not applicable
- Throws:
SQLException
-
getTableName
Gets the designated column's table name.- Specified by:
getTableNamein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- table name or "" if not applicable
- Throws:
SQLException
-
getPrecision
Get the designated column's specified column size. The returned value represents the maximum column size for the designated column.- Specified by:
getPrecisionin interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- precision
- Throws:
SQLException
-
getScale
Gets the designated column's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable.- Specified by:
getScalein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- scale
- Throws:
SQLException
-
getCatalogName
Gets the designated column's table's catalog name. MonetDB does not support the catalog naming concept, so we return "".- Specified by:
getCatalogNamein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- ""
- Throws:
SQLException
-
getColumnType
Retrieves the designated column's SQL type.- Specified by:
getColumnTypein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- SQL type from java.sql.Types
- Throws:
SQLException- if the column parameter is out of bounds
-
getColumnTypeName
Retrieves the designated column's MonetDBe type name as a String.- Specified by:
getColumnTypeNamein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- MonetDBe type
- Throws:
SQLException- if the column parameter is out of bounds
-
getColumnTypeInt
Retrieves the designated column's MonetDBe type name as an integer.- Parameters:
column- Column number (starts at 1)- Returns:
- MonetDBe type as an integer
- Throws:
SQLException- if the column parameter is out of bounds
-
getColumnClassName
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:
getColumnClassNamein interfaceResultSetMetaData- Parameters:
column- Column 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
-
isReadOnly
Indicates whether the designated column is definitely not writable. MonetDB does not support cursor updates, so nothing is writable and we always return true.- Specified by:
isReadOnlyin interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- true
- Throws:
SQLException
-
isWritable
Indicates whether it is possible for a write on the designated column to succeed. MonetDB does not support cursor updates, so nothing is writable and we always return false.- Specified by:
isWritablein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- false;
- Throws:
SQLException
-
isDefinitelyWritable
Indicates whether a write on the designated column will definitely succeed. MonetDB does not support cursor updates, so nothing is writable and we always return false.- Specified by:
isDefinitelyWritablein interfaceResultSetMetaData- Parameters:
column- Column number (starts at 1)- Returns:
- false;
- Throws:
SQLException
-