lookup_by_id


Description:

public abstract unowned Record lookup_by_id (uint id)

Parameters:

this

A media database.

id

A record ID.

Returns:

the database record corresponding to id. This record should be unrefed by the calling code when no longer required.

If you are implementing a full database using this API, then you probably want to increment the reference count before returning a record pointer.

On the other hand, if you are implementing an adapter class and the records are stored elsewhere, then you will probably return a transient record. That is, once the user is done using it, the returned record should be free'd because it is a adapter copy of the real record. In this case, the reference count should not be incremented before returning a record pointer.