@@ -621,7 +621,7 @@ def test_rdb_persistency_multiple_statements_synchronous(self):
621621 result = self .exec_naked ("REDISQL.V2.EXEC" , "L" , "COmmaNd" , "SELECT * FROM t1 ORDER BY A;" , "no_HEader" , "NoW" )
622622 self .assertEqual (result , [["RESULT" ], [3 ], [4 ], [103 ], [104 ]])
623623
624- class TestListStatements (TestRediSQLWithExec ):
624+ class TestStatementsIntrospection (TestRediSQLWithExec ):
625625 def compare_results (self , a , b ):
626626 self .assertEquals (a [0 ], b [0 ]) # 'RESULT'
627627 self .assertEquals (a [1 ], b [1 ]) # names
@@ -684,6 +684,20 @@ def test_list_one(self):
684684 ['select_all' , 'SELECT * from t1' , 0 , 1 ],
685685 ['select_multiples' , "select ?1; select ?2; select ?3;" , 3 , 1 ]])
686686
687+ result = self .exec_naked ("REDISQL.V2.STATEMENT" , "A" , "SHOW" , "insert" )
688+ self .compare_results (result , [['RESULT' ],
689+ ["identifier" , 'SQL' , 'parameters_count' , 'read_only' ],
690+ ['TEXT' , 'TEXT' , 'INT' , 'INT' ],
691+ ['insert' , 'insert into t1 values(?1);' , 1 , 0 ]
692+ ])
693+
694+ result = self .exec_naked ("REDISQL.V2.STATEMENT" , "A" , "SHOW" , "select_multiples" )
695+ self .compare_results (result , [['RESULT' ],
696+ ["identifier" , 'SQL' , 'parameters_count' , 'read_only' ],
697+ ['TEXT' , 'TEXT' , 'INT' , 'INT' ],
698+ ['select_multiples' , "select ?1; select ?2; select ?3;" , 3 , 1 ]
699+ ])
700+
687701class TestExecWithArguments (TestRediSQLWithExec ):
688702 def test_exec_with_args (self ):
689703 with DB (self , "C" ):
0 commit comments