jdk/src/share/classes/java/sql/DatabaseMetaData.java
changeset 15278 e081d3f73b75
parent 6666 80571aeec9b0
child 18156 edb590d448c5
equal deleted inserted replaced
15277:245068ba31b3 15278:e081d3f73b75
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
  2520      *  <LI><B>COLUMN_NAME</B> String => column name; <code>null</code> when TYPE is
  2520      *  <LI><B>COLUMN_NAME</B> String => column name; <code>null</code> when TYPE is
  2521      *      tableIndexStatistic
  2521      *      tableIndexStatistic
  2522      *  <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending,
  2522      *  <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending,
  2523      *      "D" => descending, may be <code>null</code> if sort sequence is not supported;
  2523      *      "D" => descending, may be <code>null</code> if sort sequence is not supported;
  2524      *      <code>null</code> when TYPE is tableIndexStatistic
  2524      *      <code>null</code> when TYPE is tableIndexStatistic
  2525      *  <LI><B>CARDINALITY</B> int => When TYPE is tableIndexStatistic, then
  2525      *  <LI><B>CARDINALITY</B> long => When TYPE is tableIndexStatistic, then
  2526      *      this is the number of rows in the table; otherwise, it is the
  2526      *      this is the number of rows in the table; otherwise, it is the
  2527      *      number of unique values in the index.
  2527      *      number of unique values in the index.
  2528      *  <LI><B>PAGES</B> int => When TYPE is  tableIndexStatisic then
  2528      *  <LI><B>PAGES</B> long => When TYPE is  tableIndexStatisic then
  2529      *      this is the number of pages used for the table, otherwise it
  2529      *      this is the number of pages used for the table, otherwise it
  2530      *      is the number of pages used for the current index.
  2530      *      is the number of pages used for the current index.
  2531      *  <LI><B>FILTER_CONDITION</B> String => Filter condition, if any.
  2531      *  <LI><B>FILTER_CONDITION</B> String => Filter condition, if any.
  2532      *      (may be <code>null</code>)
  2532      *      (may be <code>null</code>)
  2533      *  </OL>
  2533      *  </OL>
  2757     boolean insertsAreDetected(int type) throws SQLException;
  2757     boolean insertsAreDetected(int type) throws SQLException;
  2758 
  2758 
  2759     /**
  2759     /**
  2760      * Retrieves whether this database supports batch updates.
  2760      * Retrieves whether this database supports batch updates.
  2761      *
  2761      *
  2762      * @return <code>true</code> if this database supports batch upcates;
  2762      * @return <code>true</code> if this database supports batch updates;
  2763      *         <code>false</code> otherwise
  2763      *         <code>false</code> otherwise
  2764      * @exception SQLException if a database access error occurs
  2764      * @exception SQLException if a database access error occurs
  2765      * @since 1.2
  2765      * @since 1.2
  2766      */
  2766      */
  2767     boolean supportsBatchUpdates() throws SQLException;
  2767     boolean supportsBatchUpdates() throws SQLException;
  3650      * @return <code>true</code> if so; <code>false</code> otherwise
  3650      * @return <code>true</code> if so; <code>false</code> otherwise
  3651      * @exception SQLException if a database access error occurs
  3651      * @exception SQLException if a database access error occurs
  3652      * @since 1.7
  3652      * @since 1.7
  3653      */
  3653      */
  3654     boolean  generatedKeyAlwaysReturned() throws SQLException;
  3654     boolean  generatedKeyAlwaysReturned() throws SQLException;
       
  3655 
       
  3656     //--------------------------JDBC 4.2 -----------------------------
       
  3657 
       
  3658     /**
       
  3659      *
       
  3660      * Retrieves the maximum number of bytes this database allows for
       
  3661      * the logical size for a {@code LOB}.
       
  3662      *<p>
       
  3663      * The default implementation will return {@code 0}
       
  3664      *
       
  3665      * @return the maximum number of bytes allowed; a result of zero
       
  3666      * means that there is no limit or the limit is not known
       
  3667      * @exception SQLException if a database access error occurs
       
  3668      * @since 1.8
       
  3669      */
       
  3670     default long getMaxLogicalLobSize() throws SQLException {
       
  3671         return 0;
       
  3672     }
       
  3673 
       
  3674     /**
       
  3675      * Retrieves whether this database supports REF CURSOR.
       
  3676      *<p>
       
  3677      * The default implementation will return {@code false}
       
  3678      *
       
  3679      * @return {@code true} if this database supports REF CURSOR;
       
  3680      *         {@code false} otherwise
       
  3681      * @exception SQLException if a database access error occurs
       
  3682      * @since 1.8
       
  3683      */
       
  3684     default boolean supportsRefCursors() throws SQLException{
       
  3685         return false;
       
  3686     }
       
  3687 
  3655 }
  3688 }