Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::Database::SqlRole Class Referenceabstract

The pure virtual methods are implemented in derived objects, where vendor specific code must be written. More...

#include <SaS/Sql/SqlRole.hpp>

+ Inheritance diagram for SoftwareAndServices::Library::Database::SqlRole:
+ Collaboration diagram for SoftwareAndServices::Library::Database::SqlRole:

Public Member Functions

 SqlRole (SQL &Db)
 SqlRole - Default Constructor. More...
 
virtual ~SqlRole ()
 SqlRole - Destructor. More...
 
virtual bool AddAdministrator (SqlRole &ToAdd)=0
 Add this role to administrators of this role. More...
 
bool AddAdministrator (const char *ToAdd)
 Add this role to administrators of this role. More...
 
virtual bool AddInRole (SqlRole &ToAdd)=0
 Add this role to the ToAdd role. More...
 
bool AddInRole (const char *ToAdd)
 Add this role to the ToAdd role. More...
 
virtual bool AddThemToUs (SqlRole &ToAdd)
 Add this role to our membership. More...
 
virtual bool AddThemToUs (const char *ToAdd)
 Add this role to our membership. More...
 
std::vector< SqlRole * > * Admins () const
 The the roles that are a granted the right to add roles to this role. More...
 
bool AreTheyOurAdministrator (SqlRole &ToTest)
 Determine if ToTest is our administrator. More...
 
bool AreTheyOurAdministrator (const char *ToTest)
 Determine if ToTest is our administrator. More...
 
bool AreTheyOurMember (SqlRole &ToTest)
 Determine if ToTest is a member of this role. More...
 
bool AreTheyOurMember (const char *ToTest)
 Determine if ToTest is a member of this role. More...
 
bool CanBypassRls () const
 Get the status of if this role can bypass row-level-security (RLS). More...
 
virtual bool CanBypassRls (bool CanBypass)=0
 Set if this role can bypass row-level-security (RLS). More...
 
bool CanCreateDb () const
 Check if this role can create a new database. More...
 
virtual bool CanCreateDb (bool CanCreate)=0
 Set if this role is allowed to create new databases. More...
 
bool CanCreateRole () const
 Check if this role can create other roles. More...
 
virtual bool CanCreateRole (bool CanCreate)=0
 Set if this role is allowed to create other roles. More...
 
bool CanLogin () const
 Check if this role can login. More...
 
virtual bool CanLogin (bool AllowLogin)=0
 Set if this role is allowed to login. More...
 
bool CanReplicate () const
 Get the status of if this role can initiate a replication, or perform a backup or restore. More...
 
virtual bool CanReplicate (bool CanBackup)=0
 Set if this role can initiate a replication or perform a backup or restore. More...
 
int32_t ConnectionLimit () const
 Get the connection limit for this role. More...
 
virtual bool ConnectionLimit (int32_t Limit)=0
 Set the number of simultaneous connections this role may have open. More...
 
virtual bool CreateRole ()=0
 Call the database and create the role as described in this object. More...
 
virtual InstanceCount_t decInstance () const
 Decrement the instance. More...
 
const char * Description () const
 Get the name of this role, or NULL when not set. More...
 
virtual bool Description (const char *SDesc)=0
 Set the description of this role. More...
 
virtual bool DropRole ()=0
 Drop this role from the database. More...
 
virtual InstanceCount_t getInstance () const
 
virtual InstanceCount_t incInstance () const
 Increment the instance. More...
 
bool InheritPrivileges () const
 Check if this role automatically inherits privileges from the roles it is a member of. More...
 
virtual bool InheritPrivileges (bool IsSu)=0
 Set if this role automatically inherits privileges from the roles it is a member of. More...
 
std::vector< SqlRole * > * InRoles () const
 The the roles this role is in. More...
 
bool IsMemberOfRole (SqlRole &ToTest)
 Determine if this role is in role ToTest. More...
 
bool IsMemberOfRole (const char *ToTest)
 Determine if this role is in role ToTest. More...
 
bool IsSuperUser () const
 Check if this role is a super user. More...
 
virtual bool IsSuperUser (bool IsSu)=0
 Set if this role is a super user. More...
 
const char * Name () const
 Get the name of this role, or NULL when not set. More...
 
virtual bool Name (const char *SName)=0
 Set the name of this role. More...
 
void operator delete (void *ToFree)
 
virtual bool RemoveAdministrator (SqlRole &RemoveFrom)=0
 Remove RemoveRole as our administrator. More...
 
bool RemoveAdministrator (const char *RemoveFrom)
 Remove RemoveRole as our administrator. More...
 
virtual bool RemoveThem (SqlRole &RemoveFrom)=0
 Remove RemoveRole from our membership. More...
 
bool RemoveThem (const char *RemoveFrom)
 Remove RemoveRole from our membership. More...
 
virtual bool RemoveUsFromRole (SqlRole &RemoveFrom, bool Cascade=false)=0
 Remove this role from the role RemoveFrom. More...
 
bool RemoveUsFromRole (const char *RemoveFrom, bool Cascade=false)
 Remove this role from the role RemoveFrom. More...
 
std::vector< SqlRole * > * RolesInThisRole () const
 Get the the roles that are a member of this role (group) More...
 
SqlSchemaSchema () const
 Get the schema for this role. More...
 
time_t ValidUntil () const
 Get the expire date/time for this account. More...
 
virtual bool ValidUntil (time_t ExpireAt)=0
 Set the expire date/time for this account. More...
 

Static Public Member Functions

static SqlRoleFind (const char *ToFind)
 Find the named ROLE. More...
 
static uint64_t GetAll (std::map< const char *, SqlRole *, CStringCompareOperator > &Results)
 Get all SqlRole objects. More...
 

Protected Attributes

std::vector< SqlRole * > * _Admin
 ADMIN. More...
 
bool _CanBypassRls
 When true, ROLE can by pass RLS. More...
 
bool _CanCreateDb
 When true, ROLE can create databases. More...
 
bool _CanCreateRole
 When true, ROLE can create roles. More...
 
bool _CanLogin
 When true, ROLE can login. More...
 
bool _CanReplicate
 When true, ROLE can replicate. More...
 
int32_t _ConnectionLimit
 Connection limit (number of connections). More...
 
const char * _Description
 Description. More...
 
bool _InDatabase
 True when this object is really an existing SQL ROLE. More...
 
bool _InheritPrivileges
 When true, ROLE can inherit. More...
 
std::vector< SqlRole * > * _InOurRole
 ROLE. More...
 
std::vector< SqlRole * > * _InRole
 IN ROLE. More...
 
bool _IsSuperUser
 When true, ROLE is superuser. More...
 
const char * _Name
 Role Name. More...
 
SQL_Sql
 The controling SQL object. More...
 
time_t _ValidUntil
 Expire time for role. More...
 

Static Protected Attributes

static std::map< const char *, SqlRole *, CStringCompareOperator > * _All
 All Roles. More...
 
static pthread_mutex_t _Once
 

Detailed Description

The pure virtual methods are implemented in derived objects, where vendor specific code must be written.

The non pure virtual methods simply return the data in the object.

Defaults to: NOSUPERUSER, NOCREATEDB, NOCREATEROLE, NOINHERIT, NOLOGIN, NOREPLICATION, NOBYPASSRLS, CONNECTION LIMIT = -1 (no limit), VALID forever, not in any roles, and not ADMIN of any role.

Note
Many of these methods will return true if the ROLE object is being created and does not exist yet in the database. If there is an error, it will show up during CreateRole().
See the implementation specific objects for any limits or issues with an implementation.
See also
PG_SqlRole
MYSQL_SqlRole

Definition at line 76 of file SqlRole.hpp.

Constructor & Destructor Documentation

◆ SqlRole()

SoftwareAndServices::Library::Database::SqlRole::SqlRole ( SQL Db)

SqlRole - Default Constructor.

Note
This creates an object. To create a role in the database, first create this object, setup all of the parameters by calling the methods in this object. Then call CreateRole() to create the ROLE in the database.
If you want an SqlRole object for a ROLE that already exists in the database, call the static method SqlRole::Find(const char*) to locate the existing SqlRole object.
If you do not know if the role exists, you can call SqlRole::Find() and when it returns NULL you will know that no such role exists in the database, or that the currently authenticated SQL user does not have access to find out.
Parameters
DbThe controlling SQL object.

◆ ~SqlRole()

virtual SoftwareAndServices::Library::Database::SqlRole::~SqlRole ( )
virtual

SqlRole - Destructor.

Member Function Documentation

◆ AddAdministrator() [1/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::AddAdministrator ( SqlRole ToAdd)
pure virtual

Add this role to administrators of this role.

Parameters
ToAddThem as administrator.
Returns
true when the database accepted the name.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ AddAdministrator() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::AddAdministrator ( const char *  ToAdd)

Add this role to administrators of this role.

Parameters
ToAddThem as administrator.
Returns
true when the database accepted the name.

◆ AddInRole() [1/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::AddInRole ( SqlRole ToAdd)
pure virtual

Add this role to the ToAdd role.

Parameters
ToAddThe role name to add this role to.
Returns
true when the database accepted the change.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ AddInRole() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::AddInRole ( const char *  ToAdd)

Add this role to the ToAdd role.

Parameters
ToAddThe role name to add this role to.
Returns
true when the database accepted the change.

◆ AddThemToUs() [1/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::AddThemToUs ( SqlRole ToAdd)
virtual

Add this role to our membership.

Parameters
ToAddThe to our membership.
Returns
true when the database accepted the name.

◆ AddThemToUs() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::AddThemToUs ( const char *  ToAdd)
virtual

Add this role to our membership.

Parameters
ToAddThe to our membership.
Returns
true when the database accepted the name.

◆ Admins()

std::vector<SqlRole*>* SoftwareAndServices::Library::Database::SqlRole::Admins ( ) const

The the roles that are a granted the right to add roles to this role.

(administrators of this role).

Returns
A std::vector<SqlRole*> of all roles that are administrators of this role.

◆ AreTheyOurAdministrator() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::AreTheyOurAdministrator ( SqlRole ToTest)

Determine if ToTest is our administrator.

Parameters
ToTestThe role to test.
Returns
true when ToTest is an administrator.

◆ AreTheyOurAdministrator() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::AreTheyOurAdministrator ( const char *  ToTest)

Determine if ToTest is our administrator.

Parameters
ToTestThe role to test.
Returns
true when ToTest is an administrator.

◆ AreTheyOurMember() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::AreTheyOurMember ( SqlRole ToTest)

Determine if ToTest is a member of this role.

Parameters
ToTestThe role to test.
Returns
true when ToTest is a member of this role.

◆ AreTheyOurMember() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::AreTheyOurMember ( const char *  ToTest)

Determine if ToTest is a member of this role.

Parameters
ToTestThe role to test.
Returns
true when ToTest is a member of this role.

◆ CanBypassRls() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::CanBypassRls ( ) const

Get the status of if this role can bypass row-level-security (RLS).

This is done at back and database dump time.

Returns
true if this role can perform the actions.

◆ CanBypassRls() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::CanBypassRls ( bool  CanBypass)
pure virtual

Set if this role can bypass row-level-security (RLS).

Parameters
CanBypassWhen true, ask the database to allow this role to perform these actions.
Returns
true if the database accepted the request, else returns false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ CanCreateDb() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::CanCreateDb ( ) const

Check if this role can create a new database.

Returns
true if this role is allowed to create new database.

◆ CanCreateDb() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::CanCreateDb ( bool  CanCreate)
pure virtual

Set if this role is allowed to create new databases.

Parameters
CanCreateWhen true, the database will asked to allow this role to create new databases. When false, the database will be asked to remove this privilege from this role.
Returns
true if the database accepted the request, else returns false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ CanCreateRole() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::CanCreateRole ( ) const

Check if this role can create other roles.

Returns
true if this role is allowed to create other roles.

◆ CanCreateRole() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::CanCreateRole ( bool  CanCreate)
pure virtual

Set if this role is allowed to create other roles.

Parameters
CanCreateWhen true, the database will asked to allow this role to create other roles. When false, the database will be asked to remove this privilege from this role.
Returns
true if the database accepted the request, else return false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ CanLogin() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::CanLogin ( ) const

Check if this role can login.

An account that can not login is often a group name that other roles inherit the groups permissions from. It is a way to GRANT and REVOKE privileges from a group of users.

Returns
true if this role is allowed to login, else returns false.

◆ CanLogin() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::CanLogin ( bool  AllowLogin)
pure virtual

Set if this role is allowed to login.

An account that can not login is often a group name that other roles inherit the groups permissions from. It is a way to GRANT and REVOKE privileges from a group of users.

Parameters
AllowLoginWhen true, the database will asked to allow this role to login. When false, the database will be asked to remove this privilege from this role.
Returns
true if the database accepted the request, else returns false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ CanReplicate() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::CanReplicate ( ) const

Get the status of if this role can initiate a replication, or perform a backup or restore.

Returns
true if this role can perform the actions.

◆ CanReplicate() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::CanReplicate ( bool  CanBackup)
pure virtual

Set if this role can initiate a replication or perform a backup or restore.

Parameters
CanBackupWhen true, ask the database to allow this role to perform these actions.
Returns
true if the database accepted the request, else returns false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ ConnectionLimit() [1/2]

int32_t SoftwareAndServices::Library::Database::SqlRole::ConnectionLimit ( ) const

Get the connection limit for this role.

Returns
The number of simultaneous connections this role may have open. A (-1) means unlimited.

◆ ConnectionLimit() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::ConnectionLimit ( int32_t  Limit)
pure virtual

Set the number of simultaneous connections this role may have open.

Parameters
LimitThe number of connections. Pass in a (-1) to set to unlimited connections.
Returns
true if the database accepted the request. Else returns false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ CreateRole()

virtual bool SoftwareAndServices::Library::Database::SqlRole::CreateRole ( )
pure virtual

Call the database and create the role as described in this object.

Returns
true if the database accepted the request.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ decInstance()

virtual InstanceCount_t SoftwareAndServices::Library::Common::instance< SqlRole >::decInstance ( ) const
inlinevirtualinherited

Decrement the instance.

Returns
The instance count, after decrementing it.

Definition at line 129 of file instance.hpp.

◆ Description() [1/2]

const char* SoftwareAndServices::Library::Database::SqlRole::Description ( ) const

Get the name of this role, or NULL when not set.

◆ Description() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::Description ( const char *  SDesc)
pure virtual

Set the description of this role.

Parameters
SDescThe schema description.
Returns
true when the database accepted the description.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ DropRole()

virtual bool SoftwareAndServices::Library::Database::SqlRole::DropRole ( )
pure virtual

Drop this role from the database.

Returns
true if the database accepted the request.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ Find()

static SqlRole* SoftwareAndServices::Library::Database::SqlRole::Find ( const char *  ToFind)
static

Find the named ROLE.

This is a pure virtual class.

Parameters
ToFindThe role name to find.
Returns
The SqlRole found, or NULL when none.

◆ GetAll()

static uint64_t SoftwareAndServices::Library::Database::SqlRole::GetAll ( std::map< const char *, SqlRole *, CStringCompareOperator > &  Results)
static

Get all SqlRole objects.

Parameters
ResultsWhere to store the results. Results will be cleared of any old data and filled in with new results if needed.
Returns
The number of entries in Results.

◆ getInstance()

virtual InstanceCount_t SoftwareAndServices::Library::Common::instance< SqlRole >::getInstance ( ) const
inlinevirtualinherited
Returns
The current instance count.

Definition at line 118 of file instance.hpp.

◆ incInstance()

virtual InstanceCount_t SoftwareAndServices::Library::Common::instance< SqlRole >::incInstance ( ) const
inlinevirtualinherited

Increment the instance.

Returns
The instance value, after incrementing it.

Definition at line 109 of file instance.hpp.

◆ InheritPrivileges() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::InheritPrivileges ( ) const

Check if this role automatically inherits privileges from the roles it is a member of.

Returns
true if this role is a super user.

◆ InheritPrivileges() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::InheritPrivileges ( bool  IsSu)
pure virtual

Set if this role automatically inherits privileges from the roles it is a member of.

Parameters
DoInheritWhen true, the database will be asked to set the role as automatically inheriting privileges the roles this role is a member of. When false, the database will be asked to remove this privilege from this role.
Returns
true if the database accepted the request, else return false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ InRoles()

std::vector<SqlRole*>* SoftwareAndServices::Library::Database::SqlRole::InRoles ( ) const

The the roles this role is in.

Returns
A std::vector<SqlRole*> of all roles this role is a member of.

◆ IsMemberOfRole() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::IsMemberOfRole ( SqlRole ToTest)

Determine if this role is in role ToTest.

Parameters
ToTestThe role to test.
Returns
true when this role is a member of ToTest.

◆ IsMemberOfRole() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::IsMemberOfRole ( const char *  ToTest)

Determine if this role is in role ToTest.

Parameters
ToTestThe role to test.
Returns
true when this role is a member of ToTest.

◆ IsSuperUser() [1/2]

bool SoftwareAndServices::Library::Database::SqlRole::IsSuperUser ( ) const

Check if this role is a super user.

Returns
true if this role is a super user.

◆ IsSuperUser() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::IsSuperUser ( bool  IsSu)
pure virtual

Set if this role is a super user.

Parameters
IsSuWhen true, the database will be asked to set this role a a super user. When false, the database will be asked to remove this privilege from this role.
Returns
true if the database accepted the request, else return false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ Name() [1/2]

const char* SoftwareAndServices::Library::Database::SqlRole::Name ( ) const

Get the name of this role, or NULL when not set.

◆ Name() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::Name ( const char *  SName)
pure virtual

Set the name of this role.

If the Name is being changed, implements 'ALTER ROLE Name() RENAME TO RoleName'

Parameters
RoleNameThe ROLE name to use.
Returns
true if the database accepted the change.

Also returns true if the current name is the same as RoleName (No change).

If this objects Name has not yet been set, it checks RoleName against existing ROLE names in the database. If RoleName already exists in the database, this method returns false.

If this objects Name has not yet been set, it checks RoleName against existing ROLE names in the database. If RoleName does not already exist in the database, this does method dose nothing until CreateRole() is called and Name(const char*) returns true.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ RemoveAdministrator() [1/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::RemoveAdministrator ( SqlRole RemoveFrom)
pure virtual

Remove RemoveRole as our administrator.

Parameters
RemoveFromRemove them as our administrator.
Returns
true when the database accepted the name.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ RemoveAdministrator() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::RemoveAdministrator ( const char *  RemoveFrom)

Remove RemoveRole as our administrator.

Parameters
RemoveFromRemove them as our administrator.
Returns
true when the database accepted the name.

◆ RemoveThem() [1/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::RemoveThem ( SqlRole RemoveFrom)
pure virtual

Remove RemoveRole from our membership.

Parameters
RemoveFromRemove from our membership.
Returns
true when the database accepted the name.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ RemoveThem() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::RemoveThem ( const char *  RemoveFrom)

Remove RemoveRole from our membership.

Parameters
RemoveFromRemove from our membership.
Returns
true when the database accepted the name.

◆ RemoveUsFromRole() [1/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::RemoveUsFromRole ( SqlRole RemoveFrom,
bool  Cascade = false 
)
pure virtual

Remove this role from the role RemoveFrom.

Parameters
RemoveFromRemove this role from the RemoveFrom role.
CascadeOptional, when true, the ROLE access will be REVOKEd and if needed by going through any chain on GRANTs as needed.

When false, the RemoveFrom must have been directly GRANTed to this role.

Returns
true when the database accepted the name.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

◆ RemoveUsFromRole() [2/2]

bool SoftwareAndServices::Library::Database::SqlRole::RemoveUsFromRole ( const char *  RemoveFrom,
bool  Cascade = false 
)

Remove this role from the role RemoveFrom.

Parameters
RemoveFromRemove this role from the RemoveFrom role.
CascadeOptional, when true, the ROLE access will be REVOKEd and if needed by going through any chain on GRANTs as needed.

When false, the RemoveFrom must have been directly GRANTed to this role.

Returns
true when the database accepted the name.

◆ RolesInThisRole()

std::vector<SqlRole*>* SoftwareAndServices::Library::Database::SqlRole::RolesInThisRole ( ) const

Get the the roles that are a member of this role (group)

Returns
A std::vector<SqlRole*> of all roles that are members of this role (group).

◆ Schema()

SqlSchema* SoftwareAndServices::Library::Database::SqlRole::Schema ( ) const

Get the schema for this role.

◆ ValidUntil() [1/2]

time_t SoftwareAndServices::Library::Database::SqlRole::ValidUntil ( ) const

Get the expire date/time for this account.

Once an account expires, it effectively does not exits.

Returns
A time_t of when this account expires. A value of ((time_t)0), means the account does not expire.

◆ ValidUntil() [2/2]

virtual bool SoftwareAndServices::Library::Database::SqlRole::ValidUntil ( time_t  ExpireAt)
pure virtual

Set the expire date/time for this account.

Once an account expires, it effectively does not exits.

Parameters
ExpireAtThe date/time this role will expire and no long be a valid account. Supply ((time_t)0) to indicate the account does not expire.
Returns
true if the database accepted the request. Else returns false.

Implemented in SoftwareAndServices::Library::Database::PG_SqlRole.

Member Data Documentation

◆ _Admin

std::vector<SqlRole*>* SoftwareAndServices::Library::Database::SqlRole::_Admin
protected

ADMIN.

Definition at line 639 of file SqlRole.hpp.

◆ _All

std::map<const char*, SqlRole*, CStringCompareOperator>* SoftwareAndServices::Library::Database::SqlRole::_All
staticprotected

All Roles.

Definition at line 696 of file SqlRole.hpp.

◆ _CanBypassRls

bool SoftwareAndServices::Library::Database::SqlRole::_CanBypassRls
protected

When true, ROLE can by pass RLS.

Definition at line 674 of file SqlRole.hpp.

◆ _CanCreateDb

bool SoftwareAndServices::Library::Database::SqlRole::_CanCreateDb
protected

When true, ROLE can create databases.

Definition at line 649 of file SqlRole.hpp.

◆ _CanCreateRole

bool SoftwareAndServices::Library::Database::SqlRole::_CanCreateRole
protected

When true, ROLE can create roles.

Definition at line 654 of file SqlRole.hpp.

◆ _CanLogin

bool SoftwareAndServices::Library::Database::SqlRole::_CanLogin
protected

When true, ROLE can login.

Definition at line 664 of file SqlRole.hpp.

◆ _CanReplicate

bool SoftwareAndServices::Library::Database::SqlRole::_CanReplicate
protected

When true, ROLE can replicate.

Definition at line 669 of file SqlRole.hpp.

◆ _ConnectionLimit

int32_t SoftwareAndServices::Library::Database::SqlRole::_ConnectionLimit
protected

Connection limit (number of connections).

Definition at line 679 of file SqlRole.hpp.

◆ _Description

const char* SoftwareAndServices::Library::Database::SqlRole::_Description
protected

Description.

Definition at line 624 of file SqlRole.hpp.

◆ _InDatabase

bool SoftwareAndServices::Library::Database::SqlRole::_InDatabase
protected

True when this object is really an existing SQL ROLE.

When false, its a local object and does not represent an existing SQL object.

This is used by Name(const char*) and other methods to defer SQL checking until the object is really a database ROLE.

Definition at line 709 of file SqlRole.hpp.

◆ _InheritPrivileges

bool SoftwareAndServices::Library::Database::SqlRole::_InheritPrivileges
protected

When true, ROLE can inherit.

Definition at line 659 of file SqlRole.hpp.

◆ _InOurRole

std::vector<SqlRole*>* SoftwareAndServices::Library::Database::SqlRole::_InOurRole
protected

ROLE.

Definition at line 634 of file SqlRole.hpp.

◆ _InRole

std::vector<SqlRole*>* SoftwareAndServices::Library::Database::SqlRole::_InRole
protected

IN ROLE.

Definition at line 629 of file SqlRole.hpp.

◆ _IsSuperUser

bool SoftwareAndServices::Library::Database::SqlRole::_IsSuperUser
protected

When true, ROLE is superuser.

Definition at line 644 of file SqlRole.hpp.

◆ _Name

const char* SoftwareAndServices::Library::Database::SqlRole::_Name
protected

Role Name.

Definition at line 619 of file SqlRole.hpp.

◆ _Sql

SQL& SoftwareAndServices::Library::Database::SqlRole::_Sql
protected

The controling SQL object.

Definition at line 689 of file SqlRole.hpp.

◆ _ValidUntil

time_t SoftwareAndServices::Library::Database::SqlRole::_ValidUntil
protected

Expire time for role.

Definition at line 684 of file SqlRole.hpp.


The documentation for this class was generated from the following file: