Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c0101e88
Kaydet (Commit)
c0101e88
authored
Eki 24, 2010
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge commit 'ooo/OOO330_m12'
üst
66d6b3fd
24f16a97
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
KeySet.cxx
dbaccess/source/core/api/KeySet.cxx
+7
-6
KeySet.hxx
dbaccess/source/core/api/KeySet.hxx
+2
-1
OptimisticSet.cxx
dbaccess/source/core/api/OptimisticSet.cxx
+4
-1
RowSetCache.cxx
dbaccess/source/core/api/RowSetCache.cxx
+1
-1
No files found.
dbaccess/source/core/api/KeySet.cxx
Dosyayı görüntüle @
c0101e88
...
...
@@ -151,7 +151,8 @@ void OKeySet::initColumns()
void
OKeySet
::
findTableColumnsMatching_throw
(
const
Any
&
i_aTable
,
const
::
rtl
::
OUString
&
i_rUpdateTableName
,
const
Reference
<
XDatabaseMetaData
>&
i_xMeta
,
const
Reference
<
XNameAccess
>&
i_xQueryColumns
)
const
Reference
<
XNameAccess
>&
i_xQueryColumns
,
::
std
::
auto_ptr
<
SelectColumnsMetaData
>&
o_pKeyColumnNames
)
{
// first ask the database itself for the best columns which can be used
Sequence
<
::
rtl
::
OUString
>
aBestColumnNames
;
...
...
@@ -193,17 +194,17 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
sUpdateTableName
=
dbtools
::
composeTableName
(
i_xMeta
,
sCatalog
,
sSchema
,
sTable
,
sal_False
,
::
dbtools
::
eInDataManipulation
);
}
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aBestColumnNames
,
sUpdateTableName
,(
*
m
_pKeyColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aBestColumnNames
,
sUpdateTableName
,(
*
o
_pKeyColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
xTblColumns
->
getElementNames
(),
sUpdateTableName
,(
*
m_pColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aParameterColumns
,
sUpdateTableName
,(
*
m_pParameterNames
),
true
);
if
(
m
_pKeyColumnNames
->
empty
()
)
if
(
o
_pKeyColumnNames
->
empty
()
)
{
::
dbtools
::
throwGenericSQLException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Could not find any key column."
)
),
*
this
);
}
for
(
SelectColumnsMetaData
::
const_iterator
keyColumn
=
m
_pKeyColumnNames
->
begin
();
keyColumn
!=
m
_pKeyColumnNames
->
end
();
for
(
SelectColumnsMetaData
::
const_iterator
keyColumn
=
o
_pKeyColumnNames
->
begin
();
keyColumn
!=
o
_pKeyColumnNames
->
end
();
++
keyColumn
)
{
...
...
@@ -249,7 +250,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
Reference
<
XDatabaseMetaData
>
xMeta
=
m_xConnection
->
getMetaData
();
Reference
<
XColumnsSupplier
>
xQueryColSup
(
m_xComposer
,
UNO_QUERY
);
const
Reference
<
XNameAccess
>
xQueryColumns
=
xQueryColSup
->
getColumns
();
findTableColumnsMatching_throw
(
makeAny
(
m_xTable
),
m_sUpdateTableName
,
xMeta
,
xQueryColumns
);
findTableColumnsMatching_throw
(
makeAny
(
m_xTable
),
m_sUpdateTableName
,
xMeta
,
xQueryColumns
,
m_pKeyColumnNames
);
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
// without extra varaible to be set
...
...
dbaccess/source/core/api/KeySet.hxx
Dosyayı görüntüle @
c0101e88
...
...
@@ -135,7 +135,8 @@ namespace dbaccess
void
findTableColumnsMatching_throw
(
const
::
com
::
sun
::
star
::
uno
::
Any
&
i_aTable
,
const
::
rtl
::
OUString
&
i_rUpdateTableName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XDatabaseMetaData
>&
i_xMeta
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>&
i_xQueryColumns
);
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>&
i_xQueryColumns
,
::
std
::
auto_ptr
<
SelectColumnsMetaData
>&
o_pKeyColumnNames
);
::
rtl
::
OUStringBuffer
createKeyFilter
();
void
tryRefetch
(
const
ORowSetRow
&
_rInsertRow
,
bool
bRefetch
);
void
executeUpdate
(
const
ORowSetRow
&
_rInsertRow
,
const
ORowSetRow
&
_rOrginalRow
,
const
::
rtl
::
OUString
&
i_sSQL
,
const
::
rtl
::
OUString
&
i_sTableName
,
const
::
std
::
vector
<
sal_Int32
>&
_aIndexColumnPositions
=
::
std
::
vector
<
sal_Int32
>
());
...
...
dbaccess/source/core/api/OptimisticSet.cxx
Dosyayı görüntüle @
c0101e88
...
...
@@ -125,6 +125,7 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::
initColumns
();
Reference
<
XDatabaseMetaData
>
xMeta
=
m_xConnection
->
getMetaData
();
bool
bCase
=
(
xMeta
.
is
()
&&
xMeta
->
storesMixedCaseQuotedIdentifiers
())
?
true
:
false
;
Reference
<
XColumnsSupplier
>
xQueryColSup
(
m_xComposer
,
UNO_QUERY
);
const
Reference
<
XNameAccess
>
xQueryColumns
=
xQueryColSup
->
getColumns
();
const
Reference
<
XTablesSupplier
>
xTabSup
(
m_xComposer
,
UNO_QUERY
);
...
...
@@ -134,7 +135,9 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::
const
::
rtl
::
OUString
*
pTableNameEnd
=
pTableNameIter
+
aTableNames
.
getLength
();
for
(
;
pTableNameIter
!=
pTableNameEnd
;
++
pTableNameIter
)
{
findTableColumnsMatching_throw
(
xTables
->
getByName
(
*
pTableNameIter
),
*
pTableNameIter
,
xMeta
,
xQueryColumns
);
::
std
::
auto_ptr
<
SelectColumnsMetaData
>
pKeyColumNames
(
new
SelectColumnsMetaData
(
bCase
));
findTableColumnsMatching_throw
(
xTables
->
getByName
(
*
pTableNameIter
),
*
pTableNameIter
,
xMeta
,
xQueryColumns
,
pKeyColumNames
);
m_pKeyColumnNames
->
insert
(
pKeyColumNames
->
begin
(),
pKeyColumNames
->
end
());
}
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
...
...
dbaccess/source/core/api/RowSetCache.cxx
Dosyayı görüntüle @
c0101e88
...
...
@@ -186,7 +186,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
}
catch
(
const
Exception
&
)
{
DBG_UNHANDLED_EXCEPTION
();
//
DBG_UNHANDLED_EXCEPTION();
}
m_pCacheSet
=
NULL
;
m_xCacheSet
.
clear
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment