Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-744

Helper macros for extracting and setting record field values

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • c
    • None

    Description

      I've created two helper macros that can be used to extract or set the value of a record field using fewer function calls. So instead of

      int  rc;
      avro_datum_t  field;
      char  *value;
      rc = avro_record_get(record, "name", &field);
      rc = avro_string_get(field, &value);
      

      you can do:

      int  rc;
      char  *value;
      avro_record_get_field_value(rc, record, string, "name", &value);
      

      Attachments

        Activity

          People

            dcreager Douglas Creager
            dcreager Douglas Creager
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: