diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-10-14 18:55:37 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-10-15 07:24:26 +0200 |
commit | 1ec93ef100bb5f6ccef91f12e28ed09feb3eb38b (patch) | |
tree | 1072355362fd9ee97a64696fa198ccd815f56667 /connectivity/source | |
parent | f0443fa4438aa98bce48bfd53dc6a687737687b6 (diff) |
Replace getDefaultValue by getColExprForDefaultSettingVal (postgresql)
Change-Id: I8e0eea84a711ce45d991c07d7811094e33bcce38
Reviewed-on: https://gerrit.libreoffice.org/80787
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity/source')
4 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index bedd686b0082..99d2f22b86b3 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1514,7 +1514,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getColumns( // allow NULL values. An empty string means // nobody knows. // => pg_attribute.attnotnull - OUString strDefaultValue = getDefaultValue(m_pSettings); + OUString strDefaultValue = getColExprForDefaultSettingVal(m_pSettings); Reference< XPreparedStatement > statement = m_origin->prepareStatement( "SELECT pg_namespace.nspname, " // 1 "pg_class.relname, " // 2 diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index fd822034c480..b8303c1a5ad0 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -632,7 +632,7 @@ static void getAutoValues( const OUString & tableName, ConnectionSettings *pConnectionSettings ) { - OUString strDefaultValue = getDefaultValue(pConnectionSettings); + OUString strDefaultValue = getColExprForDefaultSettingVal(pConnectionSettings); Reference< XPreparedStatement > stmt = connection->prepareStatement( "SELECT pg_attribute.attname, " + strDefaultValue + "FROM pg_class, pg_namespace, pg_attribute " diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index 537d915a7781..63ed515e2659 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -836,7 +836,7 @@ OString extractSingleTableFromSelect( const std::vector< OString > &vec ) } -OUString getDefaultValue(ConnectionSettings const *settings) +OUString getColExprForDefaultSettingVal(ConnectionSettings const *settings) { return (PQserverVersion( settings->pConnection ) < 80000)? OUString("pg_attrdef.adsrc"): diff --git a/connectivity/source/drivers/postgresql/pq_tools.hxx b/connectivity/source/drivers/postgresql/pq_tools.hxx index 99bdbeb14873..af751f8e633b 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.hxx +++ b/connectivity/source/drivers/postgresql/pq_tools.hxx @@ -100,7 +100,7 @@ void disposeObject( const css::uno::Reference< css::uno::XInterface > & r ); OUString extractTableFromInsert( const OUString & sql ); OString extractSingleTableFromSelect( const std::vector< OString > &vec ); -OUString getDefaultValue(ConnectionSettings const *settings); +OUString getColExprForDefaultSettingVal(ConnectionSettings const *settings); void tokenizeSQL( const OString & sql, std::vector< OString > &vec ); void splitSQL( const OString & sql, std::vector< OString > &vec ); |