summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/postgresql/pq_statement.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-02-07 12:04:02 +0200
committerNoel Grandin <noel@peralex.com>2016-02-09 13:44:42 +0200
commit383e11040c2b329705d9f161576cf162390b52a7 (patch)
tree8d6dab417ea9836f991eafe6580eea0f2f3a5463 /connectivity/source/drivers/postgresql/pq_statement.cxx
parentf1cb83cef59c3b1d5ee780e8916832483468fab7 (diff)
sequence->vector in postgresql
Change-Id: I57bf8f4404df9f73d9a52c651c9f27784f10c937
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_statement.cxx')
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 68ff3a14670b..bff2a1967340 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -317,14 +317,14 @@ static void raiseSQLException(
// returns the elements of the primary key of the given table
// static Sequence< Reference< com::sun::star::beans::XPropertySet > > lookupKeys(
-static Sequence< OUString > lookupKeys(
+static std::vector< OUString > lookupKeys(
const Reference< com::sun::star::container::XNameAccess > &tables,
const OUString & table,
OUString *pSchema,
OUString *pTable,
ConnectionSettings *pSettings)
{
- Sequence< OUString > ret;
+ std::vector< OUString > ret;
Reference< XKeysSupplier > keySupplier;
Statics & st = getStatics();
@@ -406,7 +406,7 @@ static Sequence< OUString > lookupKeys(
Reference< XIndexAccess > ( columns->getColumns(), UNO_QUERY );
int length = indexAccess->getCount();
- ret.realloc( length );
+ ret.resize( length );
// printf( "primary key for Table %s is ",
// OUStringToOString( table, RTL_TEXTENCODING_ASCII_US ).getStr() );
for( int i = 0 ; i < length ; i ++ )
@@ -420,7 +420,7 @@ static Sequence< OUString > lookupKeys(
// printf( "\n" );
}
}
- if( ! ret.getLength() )
+ if( ! ret.size() )
{
if( isLog( pSettings, LogLevel::INFO ) )
{
@@ -496,7 +496,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
// belonging to the primary key are in the result set, allow updateable result sets
// otherwise, don't
OUString table, schema;
- Sequence< OUString > sourceTableKeys;
+ std::vector< OUString > sourceTableKeys;
OStringVector vec;
tokenizeSQL( cmd, vec );
OUString sourceTable =
@@ -519,7 +519,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
// check, whether the columns are in the result set (required !)
int i;
- for( i = 0 ; i < sourceTableKeys.getLength() ; i ++ )
+ for( i = 0 ; i < (int)sourceTableKeys.size() ; i ++ )
{
if( -1 == PQfnumber(
result,
@@ -530,7 +530,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
}
}
- if( sourceTableKeys.getLength() && i == sourceTableKeys.getLength() )
+ if( sourceTableKeys.size() && i == (int)sourceTableKeys.size() )
{
*(data->pLastResultset) =
UpdateableResultSet::createFromPGResultSet(
@@ -546,7 +546,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
buf.append( "." );
aReason = buf.makeStringAndClear();
}
- else if( sourceTableKeys.getLength() )
+ else if( sourceTableKeys.size() )
{
OStringBuffer buf( 128 );
buf.append( "can't support updateable resultset for table " );