iRODS/server/core/src/irods_database_manager.cpp
error database_manager::resolve(
        std::string  _key,
        database_ptr& _value ) {

        if ( _key.empty() ) {
            return ERROR( SYS_INVALID_INPUT_PARAM, "empty key" );
        }

        if ( plugins_.has_entry( _key ) ) {
            _value = plugins_[ _key ];
            return SUCCESS();

        }
        else {
            std::stringstream msg;
            msg << "no database plugin found for name ["
                << _key
                << "]";
            return ERROR( SYS_INVALID_INPUT_PARAM, msg.str() );

        }

    }
// =-=-=-=-=-=-=-
// public - retrieve a database plugin given its key
retrieve a database plugin given its key
retrieve a database plugin given its key
error database_manager::resolve(
        std::string  _key,
        database_ptr& _value ) {
        if ( _key.empty() ) {
            return ERROR( SYS_INVALID_INPUT_PARAM, "empty key" );
        }
        if ( plugins_.has_entry( _key ) ) {
            _value = plugins_[ _key ];
            return SUCCESS();
        }
        else {
            std::stringstream msg;
            msg << "no database plugin found for name ["
                << _key
                << "]";
            return ERROR( SYS_INVALID_INPUT_PARAM, msg.str() );
        }
    }
error database_manager :: resolve ( std :: string _key , database_ptr & _value ) { if ( _key . empty ( ) ) { return ERROR ( SYS_INVALID_INPUT_PARAM , " " ) ; } if ( plugins_ . has_entry ( _key ) ) { _value = plugins_ [ _key ] ; return SUCCESS ( ) ; } else { std :: stringstream msg ; msg << " " << _key << " " ; return ERROR ( SYS_INVALID_INPUT_PARAM , msg . str ( ) ) ; } }
public - retrieve a database plugin given its key
public - retrieve a database plugin given its key