示例#1
0
 protected static function parse_column_name($column_name, $type = CassandraCF::CT_BytesType)
 {
     if (!$column_name) {
         return NULL;
     }
     if (!UUID::isBinary($column_name)) {
         return $column_name;
     }
     $s = strlen($column_name);
     if ($s == 16) {
         return UUID::toStr($column_name);
     }
     //default LongType
     if ($s == 8) {
         $tmp = unpack("N2", $column_name);
         // FIXME: currently only supports 32 bit unsigned
         return $tmp[1];
     }
     return $column_name;
 }