Home | History | Annotate | Download | only in test

Lines Matching refs:cur

36         self.cur = self.con.cursor()
37 self.cur.execute("create table test(i integer, s varchar, f number, b blob)")
40 self.cur.close()
44 self.cur.execute("insert into test(s) values (?)", (u"?sterreich",))
45 self.cur.execute("select s from test")
46 row = self.cur.fetchone()
50 self.cur.execute("insert into test(i) values (?)", (42,))
51 self.cur.execute("select i from test")
52 row = self.cur.fetchone()
57 self.cur.execute("insert into test(i) values (?)", (num,))
58 self.cur.execute("select i from test")
59 row = self.cur.fetchone()
64 self.cur.execute("insert into test(f) values (?)", (val,))
65 self.cur.execute("select f from test")
66 row = self.cur.fetchone()
71 self.cur.execute("insert into test(b) values (?)", (val,))
72 self.cur.execute("select b from test")
73 row = self.cur.fetchone()
77 self.cur.execute(u"select '?sterreich'")
78 row = self.cur.fetchone()
83 self.cur.execute("select ?", (chr(150),))
92 self.cur.execute("select ?", (chr(150),))
101 self.cur.execute("select ?", (chr(150),))
132 self.cur = self.con.cursor()
133 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))")
149 self.cur.close()
154 self.cur.execute("insert into test(s) values (?)", ("foo",))
155 self.cur.execute('select s as "s [WRONG]" from test')
156 row = self.cur.fetchone()
161 self.cur.execute("insert into test(i) values (?)", (42,))
162 self.cur.execute("select i from test")
163 row = self.cur.fetchone()
169 self.cur.execute("insert into test(i) values (?)", (num,))
170 self.cur.execute("select i from test")
171 row = self.cur.fetchone()
177 self.cur.execute("insert into test(f) values (?)", (val,))
178 self.cur.execute("select f from test")
179 row = self.cur.fetchone()
184 self.cur.execute("insert into test(b) values (?)", (False,))
185 self.cur.execute("select b from test")
186 row = self.cur.fetchone()
189 self.cur.execute("delete from test")
190 self.cur.execute("insert into test(b) values (?)", (True,))
191 self.cur.execute("select b from test")
192 row = self.cur.fetchone()
198 self.cur.execute("insert into test(u) values (?)", (val,))
199 self.cur.execute("select u from test")
200 row = self.cur.fetchone()
205 self.cur.execute("insert into test(foo) values (?)", (val,))
206 self.cur.execute("select foo from test")
207 row = self.cur.fetchone()
214 self.cur.execute("insert into test(f) values (?)", (val,))
225 self.cur.execute("insert into test(f) values (:val)", {"val": val})
235 self.cur.execute("insert into test(bin) values (?)", (val,))
236 self.cur.execute("select bin from test")
237 row = self.cur.fetchone()
241 self.cur.execute("insert into test(n1) values (5)")
242 value = self.cur.execute("select n1 from test").fetchone()[0]
248 self.cur.execute("insert into test(n2) values (5)")
249 value = self.cur.execute("select n2 from test").fetchone()[0]
256 self.cur = self.con.cursor()
257 self.cur.execute("create table test(x foo)")
269 self.cur.close()
277 self.cur.execute("insert into test(x) values (?)", ("xxx",))
278 self.cur.execute("select x from test")
279 val = self.cur.fetchone()[0]
283 self.cur.execute("insert into test(x) values (?)", (None,))
284 self.cur.execute("select x from test")
285 val = self.cur.fetchone()[0]
289 self.cur.execute("insert into test(x) values (?)", ("xxx",))
290 self.cur.execute('select x as "x [bar]" from test')
291 val = self.cur.fetchone()[0]
296 self.assertEqual(self.cur.description[0][0], "x")
299 self.cur.execute("""select 'other' as "x [b1b1]\"""")
300 val = self.cur.fetchone()[0]
308 self.cur.execute("select * from test where 0 = 1")
309 self.assertEqual(self.cur.description[0][0], "x")
323 self.cur = self.con.cursor()
327 self.cur.close()
331 self.cur.execute("select ?", (4,))
332 val = self.cur.fetchone()[0]
356 self.cur = self.con.cursor()
357 self.cur.execute("create table test(d date, ts timestamp)")
360 self.cur.close()
365 self.cur.execute("insert into test(d) values (?)", (d,))
366 self.cur.execute("select d from test")
367 d2 = self.cur.fetchone()[0]
372 self.cur.execute("insert into test(ts) values (?)", (ts,))
373 self.cur.execute("select ts from test")
374 ts2 = self.cur.fetchone()[0]
384 self.cur.execute("insert into test(ts) values (current_timestamp)")
385 self.cur.execute("select ts from test")
386 ts = self.cur.fetchone()[0]
392 self.cur.execute("insert into test(ts) values (?)", (ts,))
393 self.cur.execute("select ts from test")
394 ts2 = self.cur.fetchone()[0]
399 self.cur.execute("insert into test(ts) values (?)", (ts,))
400 self.cur.execute("select ts from test")
401 ts2 = self.cur.fetchone()[0]