Re: Relational Databases Examples

21 views
Skip to first unread message
Message has been deleted

Christoph Kappestein

unread,
Sep 6, 2022, 4:31:13 PM9/6/22
to Fusio
Hi,

so there are multiple options, you could i.e. use the SQL-Builder action s. https://docs.fusio-project.org/docs/backend/api/action/sql-builder/ which provides a JSON syntax to create complex results.

best regards
Christoph


jml...@gmail.com schrieb am Dienstag, 6. September 2022 um 07:55:07 UTC+2:
Supposed i have this generated

{ "totalResults": 4, "itemsPerPage": 16, "startIndex": 0, "entry":
 { "id": 4, "plan": 1 }, 
 { "id": 3, "plan": 2}, 
 { "id": 2, " plan": 1 }, 
 { "id": 1, " plan ": 3 }
 ]
}

But I want to generate something like this

{ "totalResults": 4, "itemsPerPage": 16, "startIndex": 0, "entry":
 { "id": 4, "plan": Gold}, 
 { "id": 3, "plan": Silver}, 
 { "id": 2, " plan": Gold}, 
 { "id": 1, " plan ": Bronze }
 ]
}

plan values: 1,2,3 should be substituted with values from a different table with the following:
1 == Gold
2 == Silver
3 == Bronze

Are there available examples using custom actions and/or using other means? Any links would be very much appreciated. Thank you very much.

John Lirac

unread,
Sep 11, 2022, 11:05:07 PM9/11/22
to Fusio
Thanks, Christoph.
Reply all
Reply to author
Forward
0 new messages