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
0999deb9
Kaydet (Commit)
0999deb9
authored
Eyl 01, 2010
tarafından
Ocke Janssen [oj]
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
dba33h: #i114246# use correct table name
üst
2d1d598e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
KeySet.cxx
dbaccess/source/core/api/KeySet.cxx
+25
-6
KeySet.hxx
dbaccess/source/core/api/KeySet.hxx
+0
-1
No files found.
dbaccess/source/core/api/KeySet.cxx
Dosyayı görüntüle @
0999deb9
...
...
@@ -198,7 +198,7 @@ void OKeySet::initColumns()
m_pForeignColumnNames
.
reset
(
new
SelectColumnsMetaData
(
bCase
)
);
}
void
OKeySet
::
findTableColumnsMatching_throw
(
const
Any
&
i_aTable
,
const
Reference
<
XDatabaseMetaData
>&
/*i_xMeta*/
,
const
Reference
<
XDatabaseMetaData
>&
i_xMeta
,
const
Reference
<
XNameAccess
>&
i_xQueryColumns
)
{
// first ask the database itself for the best columns which can be used
...
...
@@ -209,9 +209,6 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
const
Reference
<
XColumnsSupplier
>
xTblColSup
(
i_aTable
,
UNO_QUERY_THROW
);
const
Reference
<
XNameAccess
>
xTblColumns
=
xTblColSup
->
getColumns
();
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aBestColumnNames
,
m_sUpdateTableName
,(
*
m_pKeyColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
xTblColumns
->
getElementNames
(),
m_sUpdateTableName
,(
*
m_pColumnNames
),
true
);
// locate parameter in select columns
Reference
<
XParametersSupplier
>
xParaSup
(
m_xComposer
,
UNO_QUERY
);
Reference
<
XIndexAccess
>
xQueryParameters
=
xParaSup
->
getParameters
();
...
...
@@ -222,7 +219,26 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
Reference
<
XPropertySet
>
xPara
(
xQueryParameters
->
getByIndex
(
i
),
UNO_QUERY_THROW
);
xPara
->
getPropertyValue
(
PROPERTY_REALNAME
)
>>=
aParameterColumns
[
i
];
}
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aParameterColumns
,
m_sUpdateTableName
,(
*
m_pParameterNames
),
true
);
if
(
m_sUpdateTableName
.
getLength
()
)
{
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aBestColumnNames
,
m_sUpdateTableName
,(
*
m_pKeyColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
xTblColumns
->
getElementNames
(),
m_sUpdateTableName
,(
*
m_pColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aParameterColumns
,
m_sUpdateTableName
,(
*
m_pParameterNames
),
true
);
}
else
{
::
rtl
::
OUString
sCatalog
,
sSchema
,
sTable
;
Reference
<
XPropertySet
>
xTableProp
(
i_aTable
,
UNO_QUERY
);
Any
aCatalog
=
xTableProp
->
getPropertyValue
(
PROPERTY_CATALOGNAME
);
aCatalog
>>=
sCatalog
;
xTableProp
->
getPropertyValue
(
PROPERTY_SCHEMANAME
)
>>=
sSchema
;
xTableProp
->
getPropertyValue
(
PROPERTY_NAME
)
>>=
sTable
;
const
::
rtl
::
OUString
sComposedUpdateTableName
=
dbtools
::
composeTableName
(
i_xMeta
,
sCatalog
,
sSchema
,
sTable
,
sal_False
,
::
dbtools
::
eInDataManipulation
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aBestColumnNames
,
sComposedUpdateTableName
,(
*
m_pKeyColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
xTblColumns
->
getElementNames
(),
sComposedUpdateTableName
,(
*
m_pColumnNames
),
true
);
::
dbaccess
::
getColumnPositions
(
i_xQueryColumns
,
aParameterColumns
,
sComposedUpdateTableName
,(
*
m_pParameterNames
),
true
);
}
SelectColumnsMetaData
::
const_iterator
aPosIter
=
m_pKeyColumnNames
->
begin
();
SelectColumnsMetaData
::
const_iterator
aPosEnd
=
m_pKeyColumnNames
->
end
();
...
...
@@ -823,7 +839,10 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
::
rtl
::
OUString
sStmt
=
::
rtl
::
OUString
::
createFromAscii
(
"SELECT "
);
sStmt
+=
sMaxStmt
;
sStmt
+=
::
rtl
::
OUString
::
createFromAscii
(
"FROM "
);
sStmt
+=
m_aSelectComposedTableName
;
::
rtl
::
OUString
sCatalog
,
sSchema
,
sTable
;
::
dbtools
::
qualifiedNameComponents
(
m_xConnection
->
getMetaData
(),
m_sUpdateTableName
,
sCatalog
,
sSchema
,
sTable
,
::
dbtools
::
eInDataManipulation
);
sStmt
+=
::
dbtools
::
composeTableNameForSelect
(
m_xConnection
,
sCatalog
,
sSchema
,
sTable
);
//sStmt += m_aSelectComposedTableName;
try
{
// now fetch the autoincrement values
...
...
dbaccess/source/core/api/KeySet.hxx
Dosyayı görüntüle @
0999deb9
...
...
@@ -112,7 +112,6 @@ namespace dbaccess
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XRow
>
m_xRow
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdb
::
XSingleSelectQueryAnalyzer
>
m_xComposer
;
::
rtl
::
OUString
m_sUpdateTableName
;
::
rtl
::
OUString
m_aSelectComposedTableName
;
::
std
::
vector
<
::
rtl
::
OUString
>
m_aFilterColumns
;
sal_Bool
m_bRowCountFinal
;
...
...
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