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
c25bb400
Kaydet (Commit)
c25bb400
authored
Ara 02, 2012
tarafından
Lionel Elie Mamane
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#42165 make nested joins as per strict ANSI SQL
Change-Id: I605d3811b27c33e35670306bb03b5a796ab72bc0
üst
b245079a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
14 deletions
+31
-14
TableConnectionData.hxx
dbaccess/source/ui/inc/TableConnectionData.hxx
+2
-1
QueryDesignView.cxx
dbaccess/source/ui/querydesign/QueryDesignView.cxx
+29
-13
No files found.
dbaccess/source/ui/inc/TableConnectionData.hxx
Dosyayı görüntüle @
c25bb400
...
...
@@ -81,7 +81,8 @@ namespace dbaui
*/
void
normalizeLines
();
OConnectionLineDataVec
*
GetConnLineDataList
(){
return
&
m_vConnLineData
;
}
const
OConnectionLineDataVec
*
GetConnLineDataList
()
const
{
return
&
m_vConnLineData
;
}
OConnectionLineDataVec
*
GetConnLineDataList
()
{
return
&
m_vConnLineData
;
}
inline
TTableWindowData
::
value_type
getReferencingTable
()
const
{
return
m_pReferencingTable
;
}
inline
TTableWindowData
::
value_type
getReferencedTable
()
const
{
return
m_pReferencedTable
;
}
...
...
dbaccess/source/ui/querydesign/QueryDesignView.cxx
Dosyayı görüntüle @
c25bb400
...
...
@@ -290,14 +290,14 @@ namespace
}
//------------------------------------------------------------------------------
::
rtl
::
OUString
BuildJoinCriteria
(
const
Reference
<
XConnection
>&
_xConnection
,
OConnectionLineDataVec
*
pLineDataList
,
OQueryTableConnectionData
*
pData
)
const
OConnectionLineDataVec
*
pLineDataList
,
const
OQueryTableConnectionData
*
pData
)
{
::
rtl
::
OUStringBuffer
aCondition
;
if
(
_xConnection
.
is
()
)
{
OConnectionLineDataVec
::
iterator
aIter
=
pLineDataList
->
begin
();
OConnectionLineDataVec
::
iterator
aEnd
=
pLineDataList
->
end
();
OConnectionLineDataVec
::
const_
iterator
aIter
=
pLineDataList
->
begin
();
OConnectionLineDataVec
::
const_
iterator
aEnd
=
pLineDataList
->
end
();
try
{
const
Reference
<
XDatabaseMetaData
>
xMetaData
=
_xConnection
->
getMetaData
();
...
...
@@ -392,7 +392,7 @@ namespace
::
rtl
::
OUString
BuildJoin
(
const
Reference
<
XConnection
>&
_xConnection
,
const
::
rtl
::
OUString
&
rLh
,
const
::
rtl
::
OUString
&
rRh
,
OQueryTableConnectionData
*
pData
)
const
OQueryTableConnectionData
*
pData
)
{
String
aErg
(
rLh
);
...
...
@@ -430,9 +430,9 @@ namespace
}
//------------------------------------------------------------------------------
::
rtl
::
OUString
BuildJoin
(
const
Reference
<
XConnection
>&
_xConnection
,
OQueryTableWindow
*
pLh
,
OQueryTableWindow
*
pRh
,
OQueryTableConnectionData
*
pData
const
OQueryTableWindow
*
pLh
,
const
OQueryTableWindow
*
pRh
,
const
OQueryTableConnectionData
*
pData
)
{
bool
bForce
=
pData
->
GetJoinType
()
==
CROSS_JOIN
||
pData
->
isNatural
();
...
...
@@ -441,20 +441,36 @@ namespace
//------------------------------------------------------------------------------
::
rtl
::
OUString
BuildJoin
(
const
Reference
<
XConnection
>&
_xConnection
,
const
::
rtl
::
OUString
&
rLh
,
OQueryTableWindow
*
pRh
,
OQueryTableConnectionData
*
pData
const
OQueryTableWindow
*
pRh
,
const
OQueryTableConnectionData
*
pData
)
{
return
BuildJoin
(
_xConnection
,
rLh
,
BuildTable
(
_xConnection
,
pRh
),
pData
);
}
//------------------------------------------------------------------------------
::
rtl
::
OUString
BuildJoin
(
const
Reference
<
XConnection
>&
_xConnection
,
OQueryTableWindow
*
pLh
,
const
OQueryTableWindow
*
pLh
,
const
::
rtl
::
OUString
&
rRh
,
OQueryTableConnectionData
*
pData
const
OQueryTableConnectionData
*
pData
)
{
return
BuildJoin
(
_xConnection
,
BuildTable
(
_xConnection
,
pLh
),
rRh
,
pData
);
// strict ANSI SQL:
// - does not support any bracketing of JOINS
// - supports nested joins only in the LEFT HAND SIDE
// In this case, we are trying to build a join with a nested join
// in the right hand side.
// So switch the direction of the join and both hand sides.
OQueryTableConnectionData
data
(
*
pData
);
switch
(
data
.
GetJoinType
())
{
case
LEFT_JOIN
:
data
.
SetJoinType
(
RIGHT_JOIN
);
break
;
case
RIGHT_JOIN
:
data
.
SetJoinType
(
LEFT_JOIN
);
break
;
}
return
BuildJoin
(
_xConnection
,
rRh
,
BuildTable
(
_xConnection
,
pLh
),
&
data
);
}
//------------------------------------------------------------------------------
void
GetNextJoin
(
const
Reference
<
XConnection
>&
_xConnection
,
...
...
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