Udostępnij za pośrednictwem


IDatabaseMetaData.GetTablePrivileges(String, String, String) Method

Definition

Retrieves a description of the access rights for each table available in a catalog.

[Android.Runtime.Register("getTablePrivileges", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;", "GetGetTablePrivileges_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Sql.IResultSet? GetTablePrivileges (string? catalog, string? schemaPattern, string? tableNamePattern);
[<Android.Runtime.Register("getTablePrivileges", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;", "GetGetTablePrivileges_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetTablePrivileges : string * string * string -> Java.Sql.IResultSet

Parameters

catalog
String

a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search

schemaPattern
String

a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search

tableNamePattern
String

a table name pattern; must match the table name as it is stored in the database

Returns

ResultSet - each row is a table privilege description

Attributes

Exceptions

a database error occurred.

Remarks

Retrieves a description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in the table. It would be wrong to assume that this privilege applies to all columns (this may be true for some systems but is not true for all.)

Only privileges matching the schema and table name criteria are returned. They are ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.

Each privilige description has the following columns: <OL> <LI><B>TABLE_CAT</B> String => table catalog (may be null) <LI><B>TABLE_SCHEM</B> String => table schema (may be null) <LI><B>TABLE_NAME</B> String => table name <LI><B>GRANTOR</B> String => grantor of access (may be null) <LI><B>GRANTEE</B> String => grantee of access <LI><B>PRIVILEGE</B> String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...) <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown </OL>

Java documentation for java.sql.DatabaseMetaData.getTablePrivileges(java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to