summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/postgresql/pq_statement.cxx
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-02-01 09:33:19 +0100
committerTor Lillqvist <tml@iki.fi>2013-02-14 13:20:14 +0000
commit77fd448d0990adc79406e13a127b2b1834984b71 (patch)
tree3b8d1b23e7029dedcb97eb1d38ba83c91dfdac51 /connectivity/source/drivers/postgresql/pq_statement.cxx
parent5502501a8848c771aff5a77448a02451e22398a4 (diff)
Removed several useless macros: UNISTRING, USTR, USTR_ASCII, ASCII_STR, ASCII_STRING, CONST_ASCII, ASCSTR, ASCII, DEFINE_CONST_UNICODE, DEFINE_CONST_OUSTRING
Change-Id: I96d690bf9f9b319e9eeafcf218ec5ce87f21215f Reviewed-on: https://gerrit.libreoffice.org/1954 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_statement.cxx')
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 7304b153bbe8..f5cdbe6af389 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -132,7 +132,6 @@ using com::sun::star::container::XEnumerationAccess;
using com::sun::star::container::XEnumeration;
using com::sun::star::container::XIndexAccess;
-#define ASCII_STR(x) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
namespace pq_sdbc_driver
{
static ::cppu::IPropertyArrayHelper & getStatementPropertyArrayHelper()
@@ -208,7 +207,7 @@ void Statement::checkClosed() throw (SQLException, RuntimeException )
{
if( ! m_pSettings || ! m_pSettings->pConnection )
throw SQLException(
- ASCII_STR("pq_driver: Statement or connection has already been closed !" ),
+ "pq_driver: Statement or connection has already been closed !",
*this, OUString(),1,Any());
}
@@ -707,13 +706,12 @@ static Sequence< OUString > getPrimaryKeyColumnNames(
// retrieve the primary key ...
Reference< XPreparedStatement > stmt = connection->prepareStatement(
- ASCII_STR(
"SELECT conkey " // 7
"FROM pg_constraint INNER JOIN pg_class ON conrelid = pg_class.oid "
"INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid "
"LEFT JOIN pg_class AS class2 ON confrelid = class2.oid "
"LEFT JOIN pg_namespace AS nmsp2 ON class2.relnamespace=nmsp2.oid "
- "WHERE pg_class.relname = ? AND pg_namespace.nspname = ? AND pg_constraint.contype='p'" ) );
+ "WHERE pg_class.relname = ? AND pg_namespace.nspname = ? AND pg_constraint.contype='p'" );
DisposeGuard guard( stmt );
Reference< XParameters > paras( stmt, UNO_QUERY );
paras->setString( 1 , tableName );
@@ -735,7 +733,7 @@ static void getAutoValues(
const OUString & tableName )
{
Reference< XPreparedStatement > stmt = connection->prepareStatement(
- ASCII_STR("SELECT pg_attribute.attname, pg_attrdef.adsrc "
+ "SELECT pg_attribute.attname, pg_attrdef.adsrc "
"FROM pg_class, pg_namespace, pg_attribute "
"LEFT JOIN pg_attrdef ON pg_attribute.attrelid = pg_attrdef.adrelid AND "
"pg_attribute.attnum = pg_attrdef.adnum "
@@ -746,7 +744,7 @@ static void getAutoValues(
// Most probably gives problems if tableName contains '%'
"pg_class.relname LIKE ? AND "
"pg_attrdef.adsrc != ''"
- ) );
+ );
DisposeGuard guard( stmt );
Reference< XParameters > paras( stmt, UNO_QUERY );
paras->setString( 1 , schemaName );