Ejemplo n.º 1
0
 def read_type(cls, f):
     optid = read_short(f)
     try:
         cqltype = lookup_cqltype(cls.type_codes[optid])
     except KeyError:
         raise cql.NotSupportedError("Unknown data type code 0x%x. Have to skip"
                                     " entire result set." % optid)
     if cqltype.typename in ('list', 'set'):
         subtype = cls.read_type(f)
         cqltype = cqltype.apply_parameters(subtype)
     elif cqltype.typename == 'map':
         keysubtype = cls.read_type(f)
         valsubtype = cls.read_type(f)
         cqltype = cqltype.apply_parameters(keysubtype, valsubtype)
     return cqltype
Ejemplo n.º 2
0
 def recv_body(cls, f):
     eventtype = read_string(f).upper()
     if eventtype in known_event_types:
         readmethod = getattr(cls, 'recv_' + eventtype.lower())
         return cls(eventtype=eventtype, eventargs=readmethod(f))
     raise cql.NotSupportedError('Unknown event type %r' % eventtype)
Ejemplo n.º 3
0
 def nextset(self):
     raise cql.NotSupportedError()
Ejemplo n.º 4
0
 def callproc(self, procname, *args):
     raise cql.NotSupportedError()