• Home
  • Raw
  • Download

Lines Matching refs:cx

98         cx = sqlite.connect(":memory:")
99 check_disallow_instantiation(self, type(cx("select 1")))
105 self.cx = sqlite.connect(":memory:")
106 cu = self.cx.cursor()
111 self.cx.close()
114 self.cx.commit()
120 self.cx.commit()
121 self.cx.commit()
124 self.cx.rollback()
130 self.cx.rollback()
131 self.cx.rollback()
134 cu = self.cx.cursor()
142 self.cx.close()
146 self.assertEqual(self.cx.Warning, sqlite.Warning)
147 self.assertEqual(self.cx.Error, sqlite.Error)
148 self.assertEqual(self.cx.InterfaceError, sqlite.InterfaceError)
149 self.assertEqual(self.cx.DatabaseError, sqlite.DatabaseError)
150 self.assertEqual(self.cx.DataError, sqlite.DataError)
151 self.assertEqual(self.cx.OperationalError, sqlite.OperationalError)
152 self.assertEqual(self.cx.IntegrityError, sqlite.IntegrityError)
153 self.assertEqual(self.cx.InternalError, sqlite.InternalError)
154 self.assertEqual(self.cx.ProgrammingError, sqlite.ProgrammingError)
155 self.assertEqual(self.cx.NotSupportedError, sqlite.NotSupportedError)
159 cx = sqlite.connect(":memory:")
160 cu = cx.cursor()
161 self.assertEqual(cx.in_transaction, False)
163 self.assertEqual(cx.in_transaction, False)
165 self.assertEqual(cx.in_transaction, True)
168 self.assertEqual(cx.in_transaction, True)
169 cx.commit()
170 self.assertEqual(cx.in_transaction, False)
173 self.assertEqual(cx.in_transaction, False)
177 self.cx.in_transaction = True
187 with sqlite.connect(path) as cx:
188 cx.execute('create table test(id integer)')
192 with sqlite.connect(TESTFN) as cx:
193 cx.execute('create table test(id integer)')
194 with sqlite.connect('file:' + TESTFN, uri=True) as cx:
195 cx.execute('insert into test(id) values(0)')
196 with sqlite.connect('file:' + TESTFN + '?mode=ro', uri=True) as cx:
198 cx.execute('insert into test(id) values(1)')
203 self.cx = sqlite.Connection.__new__(sqlite.Connection)
207 lambda: self.cx.isolation_level,
208 lambda: self.cx.total_changes,
209 lambda: self.cx.in_transaction,
210 lambda: self.cx.iterdump(),
211 lambda: self.cx.cursor(),
212 lambda: self.cx.close(),
223 self.cx = sqlite.connect(":memory:")
224 self.cu = self.cx.cursor()
233 self.cx.close()
387 self.assertLess(2, self.cx.total_changes, msg='total changes reported wrong value')
452 cur = self.cx.cursor()
504 self.assertEqual(self.cu.connection, self.cx)
509 cur = self.cx.cursor(f)
880 self.cx = sqlite.connect(":memory:")
881 self.cu = self.cx.cursor()
890 self.cx.close()
893 self.cx.isolation_level = None # autocommit mode
894 self.cu = self.cx.cursor()
902 self.cx.commit()
910 self.cx.isolation_level = None # autocommit mode
911 self.cu = self.cx.cursor()
918 self.cx.commit()
1014 cx = sqlite.connect(TESTFN, timeout=self.CONNECTION_TIMEOUT)
1016 with cx:
1017 cx.execute("insert into t values('test')")
1023 cx.close()