Example #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
Example #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)
Example #3
0
 def nextset(self):
     raise cql.NotSupportedError()
Example #4
0
 def callproc(self, procname, *args):
     raise cql.NotSupportedError()