Types¶
-
class
pg_grant.types.Privileges(grantee, grantor, privs=NOTHING, privswgo=NOTHING)[source]¶ Bases:
objectStores information from a parsed privilege string.
See also
-
as_grant_statements(type_: pg_grant.types.PgObjectType, target, **kwargs)[source]¶ Return array of
grant()statements that can be executed to grant these privileges. Refer to the function documentation for the meaning of target and additional keyword arguments.Note
This requires installing with the
sqlalchemyextra.
-
as_revoke_statements(type_: pg_grant.types.PgObjectType, target, **kwargs)[source]¶ Return array of
revoke()statements that can be executed to revoke these privileges. Refer to the function documentation for the meaning of target and additional keyword arguments.Note
The statement for the privswgo privileges will revoke them fully, not only their grant options.
Note
This requires installing with the
sqlalchemyextra.
-
-
class
pg_grant.types.RelationInfo(oid, name, owner, acl)[source]¶ Bases:
objectHolds object information and privileges as queried using the
querysubmodule.-
oid¶ Row identifier.
-
name¶ Name of the table, sequence, etc.
-
owner¶ Owner of the relation.
-
acl¶ Access control list.
-
-
class
pg_grant.types.SchemaRelationInfo(oid, name, owner, acl, schema)[source]¶ Bases:
pg_grant.types.RelationInfoHolds object information and privileges as queried using the
querysubmodule.-
schema¶ The name of the schema that contains this relation.
-
-
class
pg_grant.types.FunctionInfo(oid, name, owner, acl, schema, arg_types)[source]¶ Bases:
pg_grant.types.SchemaRelationInfoHolds object information and privileges as queried using the
querysubmodule.-
arg_types¶ Data types of the function arguments.
-
-
class
pg_grant.types.ColumnInfo(table_oid, schema, table, column, owner, acl)[source]¶ Bases:
objectHolds object information and privileges as queried using the
querysubmodule.-
table_oid¶ Table identifier.
-
schema¶ The name of the schema that contains the table.
-
table¶ Name of the table.
-
column¶ Name of the column.
-
owner¶ Owner of the table.
-
acl¶ Column access control list.
-