コード例 #1
0
 def process_bind_param(self, value, dialect):
     if value is None:
         return None
     assert value.startswith(self._implicit)
     return b''.join([
         serialize_varint(len(value)-len(self._implicit)),
         value[len(self._implicit):].tobytes()])
コード例 #2
0
 def process_bind_param(self, value, dialect):
     if value is None:
         return None
     assert value.startswith(self._implicit)
     return b''.join([
         serialize_varint(len(value) - len(self._implicit)),
         value[len(self._implicit):].tobytes()
     ])
コード例 #3
0
 def __test__(self, long_, result):
     self.assertEqual(serialize_varint(long_), result)