Home | History | Annotate | Download | only in test

Lines Matching refs:cur

37         self.cur = self.con.cursor()
38 self.cur.execute("create table test(i integer, s varchar, f number, b blob)")
41 self.cur.close()
45 self.cur.execute("insert into test(s) values (?)", (u"?sterreich",))
46 self.cur.execute("select s from test")
47 row = self.cur.fetchone()
51 self.cur.execute("insert into test(i) values (?)", (42,))
52 self.cur.execute("select i from test")
53 row = self.cur.fetchone()
58 self.cur.execute("insert into test(i) values (?)", (num,))
59 self.cur.execute("select i from test")
60 row = self.cur.fetchone()
65 self.cur.execute("insert into test(f) values (?)", (val,))
66 self.cur.execute("select f from test")
67 row = self.cur.fetchone()
73 self.cur.execute("insert into test(b) values (?)", (val,))
74 self.cur.execute("select b from test")
75 row = self.cur.fetchone()
79 self.cur.execute(u"select '?sterreich'")
80 row = self.cur.fetchone()
85 self.cur.execute("select ?", (chr(150),))
94 self.cur.execute("select ?", (chr(150),))
103 self.cur.execute("select ?", (chr(150),))
134 self.cur = self.con.cursor()
135 self.cur.execute("create table test(i int, s str, f float, b bool, u unicode, foo foo, bin blob, n1 number, n2 number(5))")
151 self.cur.close()
156 self.cur.execute("insert into test(s) values (?)", ("foo",))
157 self.cur.execute('select s as "s [WRONG]" from test')
158 row = self.cur.fetchone()
163 self.cur.execute("insert into test(i) values (?)", (42,))
164 self.cur.execute("select i from test")
165 row = self.cur.fetchone()
171 self.cur.execute("insert into test(i) values (?)", (num,))
172 self.cur.execute("select i from test")
173 row = self.cur.fetchone()
179 self.cur.execute("insert into test(f) values (?)", (val,))
180 self.cur.execute("select f from test")
181 row = self.cur.fetchone()
186 self.cur.execute("insert into test(b) values (?)", (False,))
187 self.cur.execute("select b from test")
188 row = self.cur.fetchone()
191 self.cur.execute("delete from test")
192 self.cur.execute("insert into test(b) values (?)", (True,))
193 self.cur.execute("select b from test")
194 row = self.cur.fetchone()
200 self.cur.execute("insert into test(u) values (?)", (val,))
201 self.cur.execute("select u from test")
202 row = self.cur.fetchone()
207 self.cur.execute("insert into test(foo) values (?)", (val,))
208 self.cur.execute("select foo from test")
209 row = self.cur.fetchone()
216 self.cur.execute("insert into test(f) values (?)", (val,))
227 self.cur.execute("insert into test(f) values (:val)", {"val": val})
238 self.cur.execute("insert into test(bin) values (?)", (val,))
239 self.cur.execute("select bin from test")
240 row = self.cur.fetchone()
244 self.cur.execute("insert into test(n1) values (5)")
245 value = self.cur.execute("select n1 from test").fetchone()[0]
251 self.cur.execute("insert into test(n2) values (5)")
252 value = self.cur.execute("select n2 from test").fetchone()[0]
259 self.cur = self.con.cursor()
260 self.cur.execute("create table test(x foo)")
272 self.cur.close()
280 self.cur.execute("insert into test(x) values (?)", ("xxx",))
281 self.cur.execute("select x from test")
282 val = self.cur.fetchone()[0]
286 self.cur.execute("insert into test(x) values (?)", (None,))
287 self.cur.execute("select x from test")
288 val = self.cur.fetchone()[0]
292 self.cur.execute("insert into test(x) values (?)", ("xxx",))
293 self.cur.execute('select x as "x [bar]" from test')
294 val = self.cur.fetchone()[0]
299 self.assertEqual(self.cur.description[0][0], "x")
302 self.cur.execute("""select 'other' as "x [b1b1]\"""")
303 val = self.cur.fetchone()[0]
311 self.cur.execute("select * from test where 0 = 1")
312 self.assertEqual(self.cur.description[0][0], "x")
326 self.cur = self.con.cursor()
330 self.cur.close()
334 self.cur.execute("select ?", (4,))
335 val = self.cur.fetchone()[0]
360 self.cur = self.con.cursor()
361 self.cur.execute("create table test(d date, ts timestamp)")
364 self.cur.close()
369 self.cur.execute("insert into test(d) values (?)", (d,))
370 self.cur.execute("select d from test")
371 d2 = self.cur.fetchone()[0]
376 self.cur.execute("insert into test(ts) values (?)", (ts,))
377 self.cur.execute("select ts from test")
378 ts2 = self.cur.fetchone()[0]
388 self.cur.execute("insert into test(ts) values (current_timestamp)")
389 self.cur.execute("select ts from test")
390 ts = self.cur.fetchone()[0]
396 self.cur.execute("insert into test(ts) values (?)", (ts,))
397 self.cur.execute("select ts from test")
398 ts2 = self.cur.fetchone()[0]
403 self.cur.execute("insert into test(ts) values (?)", (ts,))
404 self.cur.execute("select ts from test")
405 ts2 = self.cur.fetchone()[0]