summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2023-08-30 10:23:31 -0400
committerHenry Castro <hcastro@collabora.com>2023-09-01 21:39:46 +0200
commit3d910abdaa18bbd237834f412675ab25d90836bc (patch)
tree14efb38b0dc3989a2142c80c56d9465d23e8b3d6 /include
parent136fbdec2cd3b3364c6d054793bdcb3b32d562eb (diff)
connectivity: add neutral context parser
Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I12b0fe811d141873aaa64af5b6c457051c3356b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156297 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156424 Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/connectivity/sqlparse.hxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx
index 15400c112240..4ccd5ebbea95 100644
--- a/include/connectivity/sqlparse.hxx
+++ b/include/connectivity/sqlparse.hxx
@@ -124,7 +124,8 @@ namespace connectivity
static sal_Int32 s_nRefCount;
// information on the current parse action
- const IParseContext* m_pContext;
+ const IParseContext* m_pContext;
+ const IParseContext* m_pNeutral;
std::unique_ptr<OSQLParseNode> m_pParseTree; // result from parsing
::std::unique_ptr< OSQLParser_Data >
m_pData;
@@ -156,7 +157,9 @@ namespace connectivity
public:
// if NULL, a default context will be used
// the context must live as long as the parser
- OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext, const IParseContext* _pContext = nullptr);
+ OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext,
+ const IParseContext* _pContext = nullptr,
+ const IParseContext* _pNeutral = nullptr);
~OSQLParser();
// Parsing an SQLStatement
@@ -173,7 +176,8 @@ namespace connectivity
bool bUseRealName = true);
// Access to the context
- const IParseContext& getContext() const {return *m_pContext;}
+ const IParseContext& getContext() const { return *m_pContext; }
+ const IParseContext* getNeutral() const { return m_pNeutral; }
/// access to the SQLError instance owned by this parser
const SQLError& getErrorHelper() const;