[Libreoffice-commits] core.git: connectivity/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 15 05:25:26 UTC 2019


 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |    2 +-
 connectivity/source/drivers/postgresql/pq_statement.cxx        |    2 +-
 connectivity/source/drivers/postgresql/pq_tools.cxx            |    2 +-
 connectivity/source/drivers/postgresql/pq_tools.hxx            |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1ec93ef100bb5f6ccef91f12e28ed09feb3eb38b
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Mon Oct 14 18:55:37 2019 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Tue Oct 15 07:24:26 2019 +0200

    Replace getDefaultValue by getColExprForDefaultSettingVal (postgresql)
    
    Change-Id: I8e0eea84a711ce45d991c07d7811094e33bcce38
    Reviewed-on: https://gerrit.libreoffice.org/80787
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

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  );


More information about the Libreoffice-commits mailing list