Hitachi

Hitachi Advanced Database Application Development Guide


8.6.77 getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)

Organization of this subsection

(1) Function

This method acquires information about access privileges for a table.

The information about access privileges that can be acquired depends on the privileges of the HADB user who executes this method. For details about the relationship between the privileges and the table information that can be acquired, see the topic Scope of information in dictionary tables and system tables that can be referenced by HADB users in the HADB Setup and Operation Guide.

(2) Format

public synchronized ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException

(3) Arguments

String catalog

Specifies a catalog name. This argument is ignored, if specified.

String schemaPattern

Specifies a schema name pattern#.

String tableNamePattern

Specifies a table name pattern#.

#

For details about the special characters that can be specified in each pattern, see (4) Special characters that can be specified in pattern character strings in 8.6.1 List of the methods in the DatabaseMetaData interface.

(4) Return value

The following table shows the format of the ResultSet object that is returned.

Table 8‒63: Format of the ResultSet object that is returned (getTablePrivileges method)

Column No.

Type

Column name

Description

1

String

TABLE_CAT

Catalog name.

The method always returns a null character string.

2

String

TABLE_SCHEM

Schema name

3

String

TABLE_NAME

Table name

4

String

GRANTOR

User who grants access privilege

5

String

GRANTEE

User who receives access privilege

6

String

PRIVILEGE

Permitted access privilege name:

  • "SELECT": SELECT privilege

  • "INSERT": INSERT privilege

  • "UPDATE": UPDATE privilege

  • "DELETE": DELETE privilege

  • "TRUNCATE": TRUNCATE privilege

  • "REFERENCES": REFERENCES privilege

  • "IMPORT TABLE": IMPORT TABLE privilege

  • "REBUILD INDEX": REBUILD INDEX privilege

  • "GET COSTINFO": GET COSTINFO privilege

  • "EXPORT TABLE": EXPORT TABLE privilege

  • "MERGE CHUNK": MERGE CHUNK privilege

  • "CHANGE CHUNK COMMENT": CHANGE CHUNK COMMENT privilege

  • "CHANGE CHUNK STATUS": CHANGE CHUNK STATUS privilege

  • "ARCHIVE CHUNK": ARCHIVE CHUNK privilege

  • "UNARCHIVE CHUNK": UNARCHIVE CHUNK privilege

7

String

IS_GRANTABLE

Whether a user who has received an access privilege can grant access privileges to other HADB users

  • YES: Access privileges can be granted to other HADB users.

  • NO: Access privileges cannot be granted to other HADB users.

(5) Exceptions

If this Connection object is closed before this method is executed, the JDBC driver throws an SQLException.