1 USING: oracle oracle.liboci prettyprint tools.test
5 "testuser" "testpassword" "//localhost/test1" log-on .
7 allocate-statement-handle
9 "CREATE TABLE TESTTABLE ( COL1 VARCHAR(40), COL2 NUMBER)" prepare-statement
11 [ t ] [ execute-statement ] unit-test
13 "INSERT INTO TESTTABLE (COL1, COL2) VALUES('hello', 50)" prepare-statement
15 [ t ] [ execute-statement ] unit-test
17 "INSERT INTO TESTTABLE (COL1, COL2) VALUES('hi', 60)" prepare-statement
19 [ t ] [ execute-statement ] unit-test
21 "INSERT INTO TESTTABLE (COL1, COL2) VALUES('bye', 70)" prepare-statement
23 [ t ] [ execute-statement ] unit-test
25 "COMMIT" prepare-statement
27 [ t ] [ execute-statement ] unit-test
29 "SELECT * FROM TESTTABLE" prepare-statement
31 1 SQLT_STR define-by-position run-query
33 [ V{ "hello" "hi" "bye" "50" "60" "70" } ] [
34 2 SQLT_STR define-by-position run-query gather-results
39 "UPDATE TESTTABLE SET COL2 = 10 WHERE COL1='hi'" prepare-statement
41 [ t ] [ execute-statement ] unit-test
43 "COMMIT" prepare-statement
45 [ t ] [ execute-statement ] unit-test
47 "SELECT * FROM TESTTABLE WHERE COL1 = 'hi'" prepare-statement
50 2 SQLT_STR define-by-position run-query gather-results
55 "DROP TABLE TESTTABLE" prepare-statement
59 free-statement-handle log-off clean-up terminate