パッケージ org.postgresql.jdbc

クラス PgResultSetMetaData

java.lang.Object
org.postgresql.jdbc.PgResultSetMetaData
すべての実装されたインタフェース:
ResultSetMetaData, Wrapper, PGResultSetMetaData

public class PgResultSetMetaData extends Object implements ResultSetMetaData, PGResultSetMetaData
  • フィールド詳細

    • connection

      protected final BaseConnection connection
    • fields

      protected final Field[] fields
  • コンストラクタの詳細

    • PgResultSetMetaData

      public PgResultSetMetaData(BaseConnection connection, Field[] fields)
      Initialise for a result with a tuple set and a field descriptor set
      パラメータ:
      connection - the connection to retrieve metadata
      fields - the array of field descriptors
  • メソッドの詳細

    • getColumnCount

      public int getColumnCount() throws SQLException
      定義:
      getColumnCount インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • isAutoIncrement

      public boolean isAutoIncrement(int column) throws SQLException

      It is believed that PostgreSQL does not support this feature.

      定義:
      isAutoIncrement インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2...
      戻り値:
      true if so
      例外:
      SQLException - if a database access error occurs
    • isCaseSensitive

      public boolean isCaseSensitive(int column) throws SQLException

      Does a column's case matter? ASSUMPTION: Any field that is not obviously case insensitive is assumed to be case sensitive

      定義:
      isCaseSensitive インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2...
      戻り値:
      true if so
      例外:
      SQLException - if a database access error occurs
    • isSearchable

      public boolean isSearchable(int column) throws SQLException

      Can the column be used in a WHERE clause? Basically for this, I split the functions into two types: recognised types (which are always useable), and OTHER types (which may or may not be useable). The OTHER types, for now, I will assume they are useable. We should really query the catalog to see if they are useable.

      定義:
      isSearchable インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2...
      戻り値:
      true if they can be used in a WHERE clause
      例外:
      SQLException - if a database access error occurs
    • isCurrency

      public boolean isCurrency(int column) throws SQLException

      Is the column a cash value? 6.1 introduced the cash/money type, which haven't been incorporated as of 970414, so I just check the type name for both 'cash' and 'money'

      定義:
      isCurrency インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2...
      戻り値:
      true if its a cash column
      例外:
      SQLException - if a database access error occurs
    • isNullable

      public int isNullable(int column) throws SQLException
      定義:
      isNullable インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • isSigned

      public boolean isSigned(int column) throws SQLException

      Is the column a signed number? In PostgreSQL, all numbers are signed, so this is trivial. However, strings are not signed (duh!)

      定義:
      isSigned インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2...
      戻り値:
      true if so
      例外:
      SQLException - if a database access error occurs
    • getColumnDisplaySize

      public int getColumnDisplaySize(int column) throws SQLException
      定義:
      getColumnDisplaySize インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getColumnLabel

      public String getColumnLabel(int column) throws SQLException
      定義:
      getColumnLabel インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getColumnName

      public String getColumnName(int column) throws SQLException
      定義:
      getColumnName インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getBaseColumnName

      public String getBaseColumnName(int column) throws SQLException
      インタフェースからコピーされた説明: PGResultSetMetaData
      Returns the underlying column name of a query result, or "" if it is unable to be determined.
      定義:
      getBaseColumnName インタフェース内 PGResultSetMetaData
      パラメータ:
      column - column position (1-based)
      戻り値:
      underlying column name of a query result
      例外:
      SQLException - if something wrong happens
    • getSchemaName

      public String getSchemaName(int column) throws SQLException
      定義:
      getSchemaName インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getBaseSchemaName

      public String getBaseSchemaName(int column) throws SQLException
      インタフェースからコピーされた説明: PGResultSetMetaData
      Returns the underlying schema name of query result, or "" if it is unable to be determined.
      定義:
      getBaseSchemaName インタフェース内 PGResultSetMetaData
      パラメータ:
      column - column position (1-based)
      戻り値:
      underlying schema name of query result
      例外:
      SQLException - if something wrong happens
    • getPrecision

      public int getPrecision(int column) throws SQLException
      定義:
      getPrecision インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getScale

      public int getScale(int column) throws SQLException
      定義:
      getScale インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getTableName

      public String getTableName(int column) throws SQLException
      定義:
      getTableName インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getBaseTableName

      public String getBaseTableName(int column) throws SQLException
      インタフェースからコピーされた説明: PGResultSetMetaData
      Returns the underlying table name of query result, or "" if it is unable to be determined.
      定義:
      getBaseTableName インタフェース内 PGResultSetMetaData
      パラメータ:
      column - column position (1-based)
      戻り値:
      underlying table name of query result
      例外:
      SQLException - if something wrong happens
    • getCatalogName

      public String getCatalogName(int column) throws SQLException

      As with getSchemaName(), we can say that if getTableName() returns n/a, then we can too - otherwise, we need to work on it.

      定義:
      getCatalogName インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2...
      戻り値:
      catalog name, or "" if not applicable
      例外:
      SQLException - if a database access error occurs
    • getColumnType

      public int getColumnType(int column) throws SQLException
      定義:
      getColumnType インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • getFormat

      public int getFormat(int column) throws SQLException
      インタフェースからコピーされた説明: PGResultSetMetaData
      Is a column Text or Binary?
      定義:
      getFormat インタフェース内 PGResultSetMetaData
      パラメータ:
      column - column position (1-based)
      戻り値:
      0 if column data format is TEXT, or 1 if BINARY
      例外:
      SQLException - if something wrong happens
      関連項目:
    • getColumnTypeName

      public String getColumnTypeName(int column) throws SQLException
      定義:
      getColumnTypeName インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • isReadOnly

      public boolean isReadOnly(int column) throws SQLException

      In reality, we would have to check the GRANT/REVOKE stuff for this to be effective, and I haven't really looked into that yet, so this will get re-visited.

      定義:
      isReadOnly インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2, etc.*
      戻り値:
      true if so*
      例外:
      SQLException - if a database access error occurs
    • isWritable

      public boolean isWritable(int column) throws SQLException

      In reality have to check the GRANT/REVOKE stuff, which I haven't worked with as yet. However, if it isn't ReadOnly, then it is obviously writable.

      定義:
      isWritable インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2, etc.
      戻り値:
      true if so
      例外:
      SQLException - if a database access error occurs
    • isDefinitelyWritable

      public boolean isDefinitelyWritable(int column) throws SQLException

      Hmmm...this is a bad one, since the two preceding functions have not been really defined. I cannot tell is the short answer. I thus return isWritable() just to give us an idea.

      定義:
      isDefinitelyWritable インタフェース内 ResultSetMetaData
      パラメータ:
      column - the first column is 1, the second is 2, etc..
      戻り値:
      true if so
      例外:
      SQLException - if a database access error occurs
    • getField

      protected Field getField(int columnIndex) throws SQLException
      For several routines in this package, we need to convert a columnIndex into a Field[] descriptor. Rather than do the same code several times, here it is.
      パラメータ:
      columnIndex - the first column is 1, the second is 2...
      戻り値:
      the Field description
      例外:
      SQLException - if a database access error occurs
    • getPGType

      protected @Nullable String getPGType(int columnIndex) throws SQLException
      例外:
      SQLException
    • getSQLType

      protected int getSQLType(int columnIndex) throws SQLException
      例外:
      SQLException
    • getColumnClassName

      public String getColumnClassName(int column) throws SQLException
      定義:
      getColumnClassName インタフェース内 ResultSetMetaData
      例外:
      SQLException
    • isWrapperFor

      public boolean isWrapperFor(Class<?> iface) throws SQLException
      定義:
      isWrapperFor インタフェース内 Wrapper
      例外:
      SQLException
    • unwrap

      public <T> T unwrap(Class<T> iface) throws SQLException
      定義:
      unwrap インタフェース内 Wrapper
      例外:
      SQLException