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

Map a user from a foreign server. More...

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

Public Member Functions

 SqlUserMapping ()
 SqlUserMapping - Default Constructor. More...
 
virtual ~SqlUserMapping ()
 SqlUserMapping - Destructor. More...
 
virtual bool Add (const char *Server, const char *LocalUser, bool IsPublic, std::map< const char *, const char *> &Opts)=0
 Add new mapping. More...
 
virtual InstanceCount_t decInstance () const
 Decrement the instance. More...
 
virtual bool Drop ()=0
 Drop this mapping. More...
 
virtual InstanceCount_t getInstance () const
 
virtual InstanceCount_t incInstance () const
 Increment the instance. More...
 
virtual const char * LocalUser () const
 Get the local user name, or NULL when not set. More...
 
void operator delete (void *ToFree)
 
virtual bool Option (const char *OptName, String &Results)
 Get the named option. More...
 
virtual bool Public () const
 Get the PUBLIC status. More...
 
virtual const char * Server ()
 Get the foreign server name, or NULL when not set. More...
 

Static Public Member Functions

static const std::map< const char *, SqlUserMapping *, CStringCompareOperator > * GetAll ()
 Get all mappings. More...
 

Protected Attributes

bool _IsPublic
 When true, the 'PUBLIC' entry. More...
 
const char * _LocalUser
 When non-NULL, the name of the local user. More...
 
std::map< const char *, const char *, CStringCompareOperator > * _Options
 The list of options for the User Mapping. More...
 
const char * _Server
 When non-NULL, the name of the foreign server. More...
 

Static Protected Attributes

static std::map< const char *, SqlUserMapping *, CStringCompareOperator > * _All
 All known mappings. More...
 
static pthread_mutex_t _Once
 

Detailed Description

Map a user from a foreign server.

Definition at line 717 of file SqlRole.hpp.

Constructor & Destructor Documentation

◆ SqlUserMapping()

SoftwareAndServices::Library::Database::SqlUserMapping::SqlUserMapping ( )

SqlUserMapping - Default Constructor.

◆ ~SqlUserMapping()

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

SqlUserMapping - Destructor.

Member Function Documentation

◆ Add()

virtual bool SoftwareAndServices::Library::Database::SqlUserMapping::Add ( const char *  Server,
const char *  LocalUser,
bool  IsPublic,
std::map< const char *, const char *> &  Opts 
)
pure virtual

Add new mapping.

Parameters
Serverthe name of the foreign server.
LocalUserthe name of the local user.
IsPublicSet the PUBLIC option.
OptsThe OptionName/OptionValue remote options. These options and values are specific to the servers foreeign-data wrapper.

Implemented in SoftwareAndServices::Library::Database::PG_SQLUSERMAPPING.

◆ decInstance()

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

Decrement the instance.

Returns
The instance count, after decrementing it.

Definition at line 129 of file instance.hpp.

◆ Drop()

virtual bool SoftwareAndServices::Library::Database::SqlUserMapping::Drop ( )
pure virtual

Drop this mapping.

Returns
True when this user mapping is dropped.

Implemented in SoftwareAndServices::Library::Database::PG_SQLUSERMAPPING.

◆ GetAll()

static const std::map<const char*, SqlUserMapping*, CStringCompareOperator>* SoftwareAndServices::Library::Database::SqlUserMapping::GetAll ( )
static

Get all mappings.

Results The pointer will be updated with the results.

Returns
The number of entries returned.

◆ getInstance()

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

Definition at line 118 of file instance.hpp.

◆ incInstance()

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

Increment the instance.

Returns
The instance value, after incrementing it.

Definition at line 109 of file instance.hpp.

◆ LocalUser()

virtual const char* SoftwareAndServices::Library::Database::SqlUserMapping::LocalUser ( ) const
virtual

Get the local user name, or NULL when not set.

Returns
The local user name.

◆ Option()

virtual bool SoftwareAndServices::Library::Database::SqlUserMapping::Option ( const char *  OptName,
String Results 
)
virtual

Get the named option.

Parameters
OptNameThe name of the option to get.
[out]ResultsWhere to place the results. The value will be appended to Results.
Returns
true when OptName existed and Results were updated.

◆ Public()

virtual bool SoftwareAndServices::Library::Database::SqlUserMapping::Public ( ) const
virtual

Get the PUBLIC status.

Returns
true status of the PUBLIC setting.

◆ Server()

virtual const char* SoftwareAndServices::Library::Database::SqlUserMapping::Server ( )
virtual

Get the foreign server name, or NULL when not set.

Returns
The foreign server name, or NULL when not set.

Member Data Documentation

◆ _All

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

All known mappings.

<User, SqluserMapping>

Definition at line 838 of file SqlRole.hpp.

◆ _IsPublic

bool SoftwareAndServices::Library::Database::SqlUserMapping::_IsPublic
protected

When true, the 'PUBLIC' entry.

Definition at line 823 of file SqlRole.hpp.

◆ _LocalUser

const char* SoftwareAndServices::Library::Database::SqlUserMapping::_LocalUser
protected

When non-NULL, the name of the local user.

Definition at line 818 of file SqlRole.hpp.

◆ _Options

std::map<const char*, const char*, CStringCompareOperator>* SoftwareAndServices::Library::Database::SqlUserMapping::_Options
protected

The list of options for the User Mapping.

(option name, option value)

Definition at line 831 of file SqlRole.hpp.

◆ _Server

const char* SoftwareAndServices::Library::Database::SqlUserMapping::_Server
protected

When non-NULL, the name of the foreign server.

Definition at line 813 of file SqlRole.hpp.


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