1

I would like to ask a question about the dss. I'm creating queries to expose services rest by retrieving data from a db postrgresql. I would like to expose a service that, based on an incoming parameter (table name), retrieves all of that table. But I have a problem. I do not know a priori the number and the name of the columns in this table. So I wonder how I can map the output (maybe in a generic object)? It's possible to do it? Or do I need to know the name of the columns absolutely?

Thanks a lot

meotony
  • 11
  • 2
  • 1
    I believe you need to know schema upfront. I'd consider such a service very bad (and insecure) practice – gusto2 Oct 29 '18 at 15:31
  • You can use some combination of dynamic SQL and stored procedure on DB side, if postgresql allows that. But I agree, that is a bad practice – Maxim Fazyloff Oct 30 '18 at 06:21

1 Answers1

0

The DSS requires you to define what the response will look like beforehand. It is not dynamic like that.

ophychius
  • 2,623
  • 2
  • 27
  • 49