Logo Search packages:      
Sourcecode: mysql-connector-java version File versions

java.sql.ResultSet com::mysql::jdbc::DatabaseMetaData::getTableTypes (  )  throws SQLException [inline]

Get the table types available in this database. The results are ordered by table type.

The table type is:

  1. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".

Returns:
ResultSet each row has a single String column that is a table type
Exceptions:
SQLException DOCUMENT ME!

Definition at line 3251 of file DatabaseMetaData.java.

References conn, s2b(), and com::mysql::jdbc::Connection::versionMeetsMinimum().

                                                                  {
        ArrayList tuples = new ArrayList();
        Field[] fields = new Field[1];
        fields[0] = new Field("", "TABLE_TYPE", Types.VARCHAR, 5);

        byte[][] tableTypeRow = new byte[1][];
        tableTypeRow[0] = TABLE_AS_BYTES;
        tuples.add(tableTypeRow);

        if (this.conn.versionMeetsMinimum(5, 0, 1)) {
            byte[][] viewTypeRow = new byte[1][];
            viewTypeRow[0] = VIEW_AS_BYTES;
            tuples.add(viewTypeRow);
        }

        byte[][] tempTypeRow = new byte[1][];
        tempTypeRow[0] = s2b("LOCAL TEMPORARY");
        tuples.add(tempTypeRow);

        return buildResultSet(fields, tuples);
    }


Generated by  Doxygen 1.6.0   Back to index