summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/file/fcode.cxx30
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx2
-rw-r--r--connectivity/source/inc/file/fcode.hxx2
3 files changed, 8 insertions, 26 deletions
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 36cba4a73485..6e1a0cdf54e5 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -63,32 +63,14 @@ void OOperandValue::setValue(const ORowSetValue& _rVal)
m_aValue = _rVal;
}
-OOperandParam::OOperandParam(OSQLParseNode const * pNode, sal_Int32 _nPos)
+OOperandParam::OOperandParam(sal_Int32 _nPos)
: OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Type
{
- OSL_ENSURE(SQL_ISRULE(pNode,parameter),"Argument is not a parameter");
- OSL_ENSURE(pNode->count() > 0,"Error in Parse Tree");
- OSQLParseNode *pMark = pNode->getChild(0);
-
- OUString aParameterName;
- if (SQL_ISPUNCTUATION(pMark, "?"))
- aParameterName = "?";
- else if (SQL_ISPUNCTUATION(pMark, ":"))
- aParameterName = pNode->getChild(1)->getTokenValue();
- else
- {
- SAL_WARN( "connectivity.drivers","Error in Parse Tree");
- }
-
- // set up Parameter-Column with default type, can be specified more precisely later using Describe-Parameter
-
- // save Identity (not especially necessary here, just for the sake of symmetry)
-
- // todo
- // OColumn* pColumn = new OFILEColumn(aParameterName,eDBType,255,0,SQL_FLAGS_NULLALLOWED);
- // rParamColumns->AddColumn(pColumn);
-
- // the value will be set just before the evaluation
+ //TODO: Actually do something here (the current state of OOperandParam appears to be "the
+ // remains of the very beginnings of a never finished implementation of support for parameters
+ // in this code", as Lionel put it in the comments at <https://gerrit.libreoffice.org/c/core/+/
+ // 116839/1#message-7b2bbf3543f559a0b67dc35cd940e2ab8829c274> "-Werror,-Wunused-but-set-variable
+ // (Clang 13 trunk)").
}
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 44d175be69f3..be01a70ed360 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -457,7 +457,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode const * pPredicateNo
}
else if (SQL_ISRULE(pPredicateNode,parameter))
{
- pOperand = new OOperandParam(pPredicateNode, ++m_nParamCounter);
+ pOperand = new OOperandParam(++m_nParamCounter);
}
else if (pPredicateNode->getNodeType() == SQLNodeType::String ||
pPredicateNode->getNodeType() == SQLNodeType::IntNum ||
diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx
index f1b4e55815ff..c78461743c27 100644
--- a/connectivity/source/inc/file/fcode.hxx
+++ b/connectivity/source/inc/file/fcode.hxx
@@ -96,7 +96,7 @@ namespace connectivity
class OOperandParam : public OOperandRow
{
public:
- OOperandParam(connectivity::OSQLParseNode const * pNode, sal_Int32 _nPos);
+ OOperandParam(sal_Int32 _nPos);
};
// Value operands