From f6a5e7589396854e10e023c25237b47e512ff047 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 14 Apr 2006 11:23:56 +0000 Subject: Adding SQLMap unit tests. Allow sqlmap to use Prado's caching module to cache records. --- tests/unit/SQLMap/maps/sqlite/DynamicAccount.xml | 448 +++++++++++++++++++++++ 1 file changed, 448 insertions(+) create mode 100644 tests/unit/SQLMap/maps/sqlite/DynamicAccount.xml (limited to 'tests/unit/SQLMap/maps/sqlite/DynamicAccount.xml') diff --git a/tests/unit/SQLMap/maps/sqlite/DynamicAccount.xml b/tests/unit/SQLMap/maps/sqlite/DynamicAccount.xml new file mode 100644 index 00000000..ff89720b --- /dev/null +++ b/tests/unit/SQLMap/maps/sqlite/DynamicAccount.xml @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + SELECT + Account_ID as Id, + + + Account_FirstName as FirstName, + + + Account_LastName as LastName, + + + + Account_Email as EmailAddress + FROM + Accounts + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_FirstName = 'Joe' + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_ID = #value# + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_FirstName = #value# + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_ID = 1 + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_ID = 1 + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_ID = 1 + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_ID = 1 + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_ID = 1 + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + where Account_ID = 1 + + + + + + + $statement$ + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + WHERE Account_ID IN + + #[]# + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + WHERE Account_ID IN + + #Ids[]# + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + WHERE Account_ID IN + + #[]# + + and Account_ID IN + + #[]# + + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + + Account_ID = #Id# + + + Account_ID in + + #Ids[]# + + + + Account_FirstName = #FirstName# + + + Account_LastName = #LastName# + + + + Account_Email = 'clinton.begin@ibatis.com' + + + Account_Email = #EmailAddress# + + + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + Account_ID IN + + #[]# + + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + + Account_ID = #[]# + + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + + + Account_ID = #[]# + + + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + + + Account_ID = #Id# + + + Account_FirstName = #FirstName# + + + Account_LastName = #LastName# + + + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + + Account_ID = #Id# + + + + + Account_FirstName = #FirstName# + + + Account_LastName = #LastName# + + + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + + (Account_FirstName = #FirstName# + + Account_LastName = #LastName# + + ) + + + Account_Email like #EmailAddress# + + + Account_ID = #Id# + + + order by Account_LastName + + + + select + Account_ID as Id, + Account_FirstName as FirstName, + Account_LastName as LastName, + Account_Email as EmailAddress + from Accounts + + + ((Account_ID $Operande$ #NumberSearch#) or + (Account_ID $Operande$ #NumberSearch#)) + + + = #StartDate# ]]> + + + = #StartDate# ]]> + + + + order by Account_LastName + + + + + \ No newline at end of file -- cgit v1.2.3