21.1. The backend API

In general, the backend API provides a get_foo() for every tag foo in the RIS specification. There are, however, two fundamentally different types of tag retrieval functions:

  1. The simple retrievals pull out values from the main table (t_refdb) of the database with a single function call.

  2. The compound retrievals need three functions: A request_foo() obtains an array of possible values. A get_foo() retrieves one or more of these values and can be used in a loop to retrieve all values. Finally, the clean_request() frees the allocated memory. Compound retrievals are used to get at values which are stored outside the main table, like authors or keywords.

The prototypes of these functions can be found in backend.h, and their use is shown in the existing backends backend-scrn.c, backend-ris.c, backend-db31.c, and backend-bibtex.c.