60 const FeatureMapping s_aMappings[] = {
87 typedef std::map< OUString, FeatureSet > FeatureSets;
88 static FeatureSets s_aFeatureSets = []()
92 const uno::Sequence< OUString > aPatterns = aDriverConfig.
getURLs();
93 for (
auto const & pattern : aPatterns )
98 for (
const FeatureMapping& rFeatureMapping : s_aMappings )
100 if ( aCurrentFeatures.has( rFeatureMapping.pAsciiFeatureName ) )
101 aCurrentSet.
put( rFeatureMapping.nItemID );
104 tmp[ pattern ] = aCurrentSet;
109 OSL_ENSURE( s_aFeatureSets.find( _rURL ) != s_aFeatureSets.end(),
"invalid URL/pattern!" );
110 return s_aFeatureSets[ _rURL ];
115 static std::map< OUString, FeatureSupport > s_aSupport = []()
117 std::map< OUString, FeatureSupport > tmp;
119 const uno::Sequence< OUString > aURLs = aDriverConfig.
getURLs();
120 const OUString* pIter = aURLs.getConstArray();
121 const OUString* pEnd = pIter + aURLs.getLength();
122 for(;pIter != pEnd;++pIter)
125 const ::comphelper::NamedValueCollection& aMetaData = aDriverConfig.
getMetaData(*pIter);
126 if ( aMetaData.has(
"Authentication") )
129 aMetaData.
get(
"Authentication") >>= sAuth;
130 if ( sAuth ==
"UserPassword" )
132 else if ( sAuth ==
"Password" )
133 aInit = FeatureSupport(
AuthPwd);
135 tmp.insert(std::make_pair(*pIter,aInit));
139 OSL_ENSURE(s_aSupport.find(_sURL) != s_aSupport.end(),
"Illegal URL!");
140 return s_aSupport[ _sURL ].eAuthentication;
const css::uno::Any & get(const OUString &_rValueName) const
css::uno::Sequence< css::beans::NamedValue > getNamedValues() const
const ::comphelper::NamedValueCollection & getFeatures(std::u16string_view _sURL) const
css::uno::Sequence< OUString > getURLs() const
const ::comphelper::NamedValueCollection & getMetaData(std::u16string_view _sURL) const
can be used to ask for (UI) support for certain advanced features
void put(const ItemID _id)
#define DSID_RESPECTRESULTSETTYPE
#define DSID_ESCAPE_DATETIME
#define DSID_ENABLEOUTERJOIN
#define DSID_AS_BEFORE_CORRNAME
#define DSID_INDEXAPPENDIX
#define DSID_MAX_ROW_SCAN
#define DSID_BOOLEANCOMPARISON
#define DSID_PARAMETERNAMESUBST
#define DSID_CHECK_REQUIRED_FIELDS
#define DSID_AUTOINCREMENTVALUE
#define DSID_PRIMARY_KEY_SUPPORT
#define DSID_IGNOREDRIVER_PRIV
#define DSID_AUTORETRIEVEENABLED
#define DSID_IGNORECURRENCY
#define DSID_SUPPRESSVERSIONCL
#define DSID_APPEND_TABLE_ALIAS
#define DSID_AUTORETRIEVEVALUE
static const FeatureSet & lcl_getFeatureSet(const OUString &_rURL)
static AuthenticationMode getAuthenticationMode(const OUString &_sURL)