Lines Matching refs:con

187         self.con = sqlite.connect(":memory:")
189 self.con.create_function("returntext", 0, func_returntext)
190 self.con.create_function("returntextwithnull", 0, func_returntextwithnull)
191 self.con.create_function("returnunicode", 0, func_returnunicode)
192 self.con.create_function("returnint", 0, func_returnint)
193 self.con.create_function("returnfloat", 0, func_returnfloat)
194 self.con.create_function("returnnull", 0, func_returnnull)
195 self.con.create_function("returnblob", 0, func_returnblob)
196 self.con.create_function("returnlonglong", 0, func_returnlonglong)
197 self.con.create_function("returnnan", 0, lambda: float("nan"))
198 self.con.create_function("returntoolargeint", 0, lambda: 1 << 65)
199 self.con.create_function("return_noncont_blob", 0,
201 self.con.create_function("raiseexception", 0, func_raiseexception)
202 self.con.create_function("memoryerror", 0, func_memoryerror)
203 self.con.create_function("overflowerror", 0, func_overflowerror)
205 self.con.create_function("isblob", 1, lambda x: isinstance(x, bytes))
206 self.con.create_function("isnone", 1, lambda x: x is None)
207 self.con.create_function("spam", -1, lambda *x: len(x))
208 self.con.execute("create table test(t text)")
211 self.con.close()
215 self.con.create_function("bla", -100, lambda x: 2*x)
220 with cx_limit(self.con, category=category, limit=1):
221 self.con.execute("select abs(-1)");
223 self.con.execute("select max(1, 2)");
232 # self.con.create_function("reftest", 0, getfunc())
233 self.con.create_function("reftest", 0, f)
234 cur = self.con.cursor()
238 cur = self.con.cursor()
245 cur = self.con.cursor()
251 cur = self.con.cursor()
258 cur = self.con.cursor()
265 cur = self.con.cursor()
273 cur = self.con.cursor()
280 cur = self.con.cursor()
287 cur = self.con.cursor()
293 cur = self.con.cursor()
298 cur = self.con.cursor()
300 self.con.execute, "select returntoolargeint()")
304 cur = self.con.cursor()
312 cur = self.con.cursor()
319 cur = self.con.cursor()
325 cur = self.con.cursor()
331 cur = self.con.execute("select isblob(x'')")
335 cur = self.con.execute("select isnone(?)", (float("nan"),))
341 self.assertRaisesRegex(OverflowError, err, self.con.execute,
347 self.con.execute, "select spam(?)",
353 cur = self.con.execute("select return_noncont_blob()")
358 self.con.execute, "select spam(?)",
365 self.con.create_function("test_params", 1, append_result)
383 cur = self.con.execute("select test_params(?)", (val,))
397 self.con.create_function("nondeterministic", 0, mock, deterministic=False)
399 self.con.execute("select nondeterministic() = nondeterministic()")
403 self.con.execute("create index t on test(t) where nondeterministic() is not null")
408 self.con.create_function("deterministic", 0, mock, deterministic=True)
410 self.con.execute("select deterministic() = deterministic()")
414 self.con.execute("create index t on test(t) where deterministic() is not null")
421 self.con.create_function("deterministic", 0, int, deterministic=True)
425 self.con.create_function("deterministic", 0, int, True)
446 cur = self.con.cursor()
448 self.con.create_function("largeint", 0, lambda value=value: value)
454 cur = self.con.cursor()
455 self.con.create_function("pychr", 1, chr)
463 cur = self.con.cursor()
465 self.con.create_function("largetext", 0, lambda size=size: "b" * size)
472 cur = self.con.cursor()
474 self.con.create_function("largeblob", 0, lambda size=size: b"b" * size)
479 self.con.create_function("badreturn", 0, lambda: self)
482 self.con.execute, "select badreturn()")
509 self.con = sqlite.connect(":memory:")
510 self.cur = self.con.cursor()
520 with self.con:
521 self.con.execute("create table test(x, y)")
522 self.con.executemany("insert into test values(?, ?)", values)
536 self.con.create_window_function("sumint", 1, WindowSumInt)
544 self.con.create_window_function,
553 self.con.create_window_function(name, 1, WindowSumInt)
566 self.con.create_window_function(name, 1, WindowSumInt)
595 self.con.create_window_function(name, 1, cls)
612 self.con.create_window_function(name, 1, MissingFinalize)
617 self.con.create_window_function("sumint", 1, None)
628 self.con.create_window_function("sumint", 1, Redefined)
638 self.con.create_window_function("err_val_ret", 1, ErrorValueReturn)
645 self.con = sqlite.connect(":memory:")
646 cur = self.con.cursor()
659 self.con.create_aggregate("nostep", 1, AggrNoStep)
660 self.con.create_aggregate("nofinalize", 1, AggrNoFinalize)
661 self.con.create_aggregate("excInit", 1, AggrExceptionInInit)
662 self.con.create_aggregate("excStep", 1, AggrExceptionInStep)
663 self.con.create_aggregate("excFinalize", 1, AggrExceptionInFinalize)
664 self.con.create_aggregate("checkType", 2, AggrCheckType)
665 self.con.create_aggregate("checkTypes", -1, AggrCheckTypes)
666 self.con.create_aggregate("mysum", 1, AggrSum)
667 self.con.create_aggregate("aggtxt", 1, AggrText)
671 #self.con.close()
676 self.con.create_function("bla", -100, AggrSum)
680 cur = self.con.cursor()
687 cur = self.con.cursor()
695 cur = self.con.cursor()
703 cur = self.con.cursor()
711 cur = self.con.cursor()
718 cur = self.con.cursor()
724 cur = self.con.cursor()
730 cur = self.con.cursor()
736 cur = self.con.cursor()
742 cur = self.con.cursor()
748 cur = self.con.cursor()
754 cur = self.con.cursor()
762 cur = self.con.execute("select mysum(i) from (select 1 as i) where i == 0")
767 cur = self.con.cursor()
785 self.con = sqlite.connect(":memory:")
786 self.con.executescript("""
794 self.con.execute("select c2 from t2")
796 self.con.set_authorizer(self.authorizer_cb)
803 self.con.execute("select * from t2")
808 self.con.execute("select c2 from t1")
812 self.con.set_authorizer(None)
813 self.con.execute("select * from t2")
814 self.con.execute("select c2 from t1")