I have a function which queries database, then, depending on result form it, can create a struct OrderWithoutDetails
or OrderWithDetails
depending on the presence of details about the order.
How do I make the function to be able to return result of both types?