1. Home
  2. Docs
  3. UniREST Solution 3.5
  4. UniREST Server
  5. API Manager
  6. Read

Read

The Read operation gives the API the ability to read Database table records.

API Reply to the Unity Game

Once called, this API can reply with:

  • the list of all the table records;
  • the list of the records that contain the provided Keys;
  • a single record that contains the provided Keys.

Read options

ID as Keythe record ID will be used in the records research. If there are columns set as “Key”, the ID and that columns will be used together.
One record onlythe data sent to the Unity game will contain one record only. It’s supposed that this API has been configured properly in order to read one record only.
Order bythe order to use when the API reads more records. It requires the selection of one column and the order direction (ascending or descending).

Column option

Readthe value of this column is read and included in the group of data this API will send to the Unity game.
Nonethis column will be ignored in the reading operation.
Keythis column value will be used exclusively as an ID for records selection.

MySQL interaction

From the MySQL point of view, this operation builds a SELECT query with this base form:

SELECT columns FROM table WHERE keys ORDER BY order

  • columns: all the columns with the option “Read”;
  • table: the selected table this API is reading;
  • keys: all the columns with the option “Key” and the ID if the “ID as key” option is selected. All the keys are joined by an AND operator;
  • order (optional): the column to use for ordering and the order direction.