summaryrefslogtreecommitdiff
path: root/tests/unit/Data/SqlMap/DynamicParameterTestMap.xml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/Data/SqlMap/DynamicParameterTestMap.xml')
-rw-r--r--tests/unit/Data/SqlMap/DynamicParameterTestMap.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/unit/Data/SqlMap/DynamicParameterTestMap.xml b/tests/unit/Data/SqlMap/DynamicParameterTestMap.xml
new file mode 100644
index 00000000..65a91154
--- /dev/null
+++ b/tests/unit/Data/SqlMap/DynamicParameterTestMap.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sqlMap namespace="DynamicParameterTestMap">
+ <select id="SelectStaticSql1" resultClass="string">
+ <![CDATA[
+ SELECT `teststring` FROM `dynamicparametertest1` WHERE `testname`="staticsql"
+ ]]>
+ </select>
+
+ <select id="SelectStaticSql2" resultClass="string">
+ <![CDATA[
+ SELECT `teststring` FROM `dynamicparametertest2` WHERE `testname`="staticsql"
+ ]]>
+ </select>
+
+ <select id="SelectDynamicTable" parameterClass="string" resultClass="string">
+ <![CDATA[
+ SELECT `teststring` FROM `$value$` WHERE `testname`="dynamictable"
+ ]]>
+ </select>
+
+ <select id="SelectDynamicComplex" parameterClass="array" resultClass="string">
+ <![CDATA[
+ SELECT CONCAT("##", `teststring`, "$$") FROM `$tablename$` WHERE `testname`=#testname, dbType=varchar#
+ ]]>
+ </select>
+
+ <select id="SelectNoDynamic" parameterClass="string" resultClass="string">
+ <![CDATA[
+ SELECT `teststring` FROM `dynamicparametertest1` WHERE `testname`=#value, dbType=varchar#
+ ]]>
+ </select>
+
+</sqlMap> \ No newline at end of file