I want to use SSQLs to do query without specifying the columns. This will
again help in my code to hide the database column name. This way if the
table column names changes anytime I just need to update my SSQLs and I will
What I have in my mind is something like this.
item.id = "5";
or something like this
query << "SELECT " << stock.cols() << " FROM stock " << "WHERE id
= 5 ";
StoreQueryResult res = query.store();
stock item = res;
I do know that there is nothing like cols(), but I was thinking if there is
some function like that which can give me the column names for the table. It
will be good if I can even replace the id in the SQL where clause with
something from the SSQLS.
And then I should be expecting all the members in the item structure to be
populated with the values. I know the code which I have in mind does not
have error handling. I have really not thought about the error scenarios
like what will happen if there is no But what I am searching is something
which helps me hide the column names. The column names are already in the
SSQLS. Cannot those be somehow re-used.
Thanks & Regards,