I dont know if this request is already been made but I would like to have the option to select the value by columnname instead of column index.
For example now it is
var vSQL = databaseManager.getDataSetByQuery('server', 'SELECT * FROM table', null, -1);
// Lets loop trough the result set
for(i = 1; i < vSQL.getMaxRowIndex(); i++)
{
variable = vSQL.getValue(1,i);
}
But this is not usable because the order of the index could change or be different on any SQL installation. But you dont want to select the column manually if you need them all when you have about 80 columns or what.
So what I would like to see is
var vSQL = databaseManager.getDataSetByQuery('server', 'SELECT * FROM table', null, -1);
// Lets loop trough the result set
for(i = 1; i < vSQL.getMaxRowIndex(); i++)
{
variable = vSQL.getValue('pk',i);
}
you can use vSQL[‘my_column’] to return the value from current row (where rowIndex points); not sure when it was introduced , I think in some version of Servoy 4 (I can check if you need this info)
Billion rows of course is not an issue. In our environment we talk about hundreds of rows. Until now I always defined an upper border of 1’000 or 10’000 rows. And I always had this bad feeling of: what happens if the maximum number of rows returned is too small? Should I always ask for hadMoreData and log this if yes?
I prefer no upper limit. And if the number of rows exceeds a reasonable size, I will add useful filters to the user.
Do set an upper limit and check if there were more rows. If yes, prompt the user with a meaningful message or log something, what ever you like, like giving them the option to extend the upper limit, maybe.
IMHO it’s better to have an upper limit and notify the user somehow than having the Client stall/crash because there are too many rows downloaded.