How to use the databases.pymysql.connections.OKPacketWrapper function in databases

To help you get started, we’ve selected a few databases examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Atticuss / SQLViking / databases / pymysql / connections.py View on Github external
def _read_ok_packet(self):
		pkt = self._read_packet()
		if not pkt.is_ok_packet():
			raise OperationalError(2014, "Command Out of Sync")
		ok = OKPacketWrapper(pkt)
		self.server_status = ok.server_status
		return True
github Atticuss / SQLViking / databases / pymysql / connections.py View on Github external
def _read_ok_packet(self, first_packet):
		ok_packet = OKPacketWrapper(first_packet)
		self.affected_rows = ok_packet.affected_rows
		self.insert_id = ok_packet.insert_id
		self.server_status = ok_packet.server_status
		self.warning_count = ok_packet.warning_count
		self.message = ok_packet.message
		self.has_next = ok_packet.has_next