summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2013-06-05 18:16:49 +0300
committerJavier Fernandez <jfernandez@igalia.com>2013-06-06 10:04:23 +0000
commit95c4c296e028de6bf5158dbe7c70c10f6d0f8ac6 (patch)
tree7c957ba74916586a9228c61b0e2b7ac4bd9ecf09 /connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
parent16d173031a2656d7e36300a1989d77cc4d7ca8ed (diff)
fb-sdbc: Pretty printing table log output
Diffstat (limited to 'connectivity/source/drivers/firebird/FDatabaseMetaData.cxx')
-rw-r--r--connectivity/source/drivers/firebird/FDatabaseMetaData.cxx34
1 files changed, 24 insertions, 10 deletions
diff --git a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
index 2044cbac1d41..dfafff59237c 100644
--- a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
@@ -896,7 +896,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
Reference< XResultSet > rs = statement->executeQuery(query.getStr());
Reference< XRow > xRow( rs, UNO_QUERY_THROW );
ODatabaseMetaDataResultSet::ORows aRows;
- int rows = 0;
+ sal_Int32 rows = 0;
while( rs->next() )
{
ODatabaseMetaDataResultSet::ORow aRow(3);
@@ -908,15 +908,29 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
OUString desc = xRow->getString( 5 );
rows++;
- if (rows < 10)
- printf("DEBUG !!! row %i : ", rows);
- else
- printf("DEBUG !!! row %i: ", rows);
- printf("%s | ", OUStringToOString( schema, RTL_TEXTENCODING_UTF8 ).getStr());
- printf("%s | ", OUStringToOString( aTableName, RTL_TEXTENCODING_UTF8 ).getStr());
- printf("%i | ", systemFlag);
- printf("%i | ", systemFlag);
- printf("%s | \n", OUStringToOString( desc, RTL_TEXTENCODING_UTF8 ).getStr());
+ if (rows < 10)
+ {
+ if ( 1 == rows )
+ SAL_DEBUG("COLUMNS | "
+ "schema | "
+ "TABLENAME | "
+ "SF| "
+ "TT| "
+ "desc |");
+ SAL_DEBUG("Row " << OUString::number(0).concat(OUString::number(rows)) << ": | "
+ << schema << " | "
+ << aTableName << " | "
+ << systemFlag << " | "
+ << tableType << " | "
+ << desc << " |");
+ }
+ else
+ SAL_DEBUG("Row " << rows << ": | "
+ << schema << " | "
+ << aTableName << " | "
+ << systemFlag << " | "
+ << tableType << " | "
+ << desc << " |");
OUString aTableType;
if( 1 == systemFlag )