Is there away using RestifyDB to make a call and get multiple relational tables at once.
For example: The MySQL DB has 5 tables
Table 1
Table 2
Table 3
Table 4
Table 5

How can I make a GET call to retrieve
Table 1 Column A and C
Table 2 Column A
Table 3 Column D

Is there away to set it to do this?

Is there away using RestifyDB to make a call and get multiple relational tables at once. For example: The MySQL DB has 5 tables Table 1 Table 2 Table 3 Table 4 Table 5 How can I make a GET call to retrieve Table 1 Column A and C Table 2 Column A Table 3 Column D Is there away to set it to do this?

Hello,

Quoting from https://restifydb.com/api/documentation/#read:

Selecting which fields should be retrieved
By default, when making a table read call, restifydb will fetch every single field in the table, plus every single field in all of the connected tables, if query expansion is turned on. This behaviour can be controlled using the _fields URL parameter. The syntax of the _fields parameters is straightforward: field1[,field2,[,field3...]]. All you have to do is specify which fields the system needs to fetch.

Example: in order to retrieve only the country names and its capitals, you need do GET /api/countrylicious/countries?_fields=name,capital ().

Please note that the field (referred in the fields expressions) must be a valid field from the table being read. Currently, restifydb does not allow limiting foreign fields. When using the _fields parameter, the query expansion is automatically disabled.

Probably in a future version... smile

Best regards,
Daniel

Hello, Quoting from https://restifydb.com/api/documentation/#read: > Selecting which fields should be retrieved By default, when making a table read call, restifydb will fetch every single field in the table, plus every single field in all of the connected tables, if query expansion is turned on. This behaviour can be controlled using the _fields URL parameter. The syntax of the _fields parameters is straightforward: field1[,field2,[,field3...]]. All you have to do is specify which fields the system needs to fetch. > Example: in order to retrieve only the country names and its capitals, you need do GET /api/countrylicious/countries?_fields=name,capital (). > **Please note that the field (referred in the fields expressions) must be a valid field from the table being read. Currently, restifydb does not allow limiting foreign fields. When using the _fields parameter, the query expansion is automatically disabled.** Probably in a future version... :) Best regards, Daniel
86
views
1
replies
2
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
All posts under this topic will be deleted ?
Powered by Codoforum
Pending draft ... Click to resume editing
Discard draft