コード例 #1
0
		def fdel(self):
			if self.__portals is None:
				raise Error("cursor is closed",
					source = 'CLIENT', creator = self.database
				)
			try:
				del self.__portals[0]
			except IndexError:
				raise InterfaceError("no portal on stack")
コード例 #2
0
	def rollback(self):
		if self._xact is None:
			raise InterfaceError(
				"rollback on connection in autocommit mode",
				source = 'DRIVER',
				details = {
					'hint': 'The "autocommit" property on the connection was set to True.'
				},
				creator = self
			)
		self._xact.rollback()
		self._xact = self.xact()
		self._xact.start()
コード例 #3
0
	def commit(self):
		if self._xact is None:
			raise InterfaceError(
				"commit on connection in autocommit mode",
				source = 'CLIENT',
				details = {
					'hint': 'The "autocommit" property on the connection was set to True.'
				},
				creator = self
			)
		self._xact.commit()
		self._xact = self.xact()
		self._xact.start()