Add QuerySetRow & Query.setRow()


#1

we have QuerySetCell and QueryAddRow, but no QuerySetRow?



#2

with this, and maybe being able to get an array back from

would enable some high performance query manipulation/construction, avoiding column
names matching and simply using column indexes when working with consistently structured
query objects


#3

I, personally, go away from queries when I need to manipulate data. I find it much easier and quicker to manipulate an array of structs and loop (for/each) over the array after manipulation, as needed.

The only exception for me is queryMap(), which I will use for decryption of encrypted database values in a small result set, but otherwise I tend to stay away from query manipulation in favor of an array of structs.

My 2 cents.

– Denny


#4

+1 for using Structs and Arrays instead of Queries when it makes sense.


#5

and what about the actual proposal for those of us who use queries?


#6

QueryAddRow() is already overloaded to take an Array or a Struct as argument.

I’m not sure what is the difference between that and the idea behind setRow()? Is it the ability to specify the row number?

+1 to add a flag to QueryGetRow() to return an Array instead of a Struct.


#7

QueryAddRow() can only add a new row, so QuerySetRow() makes sense if you want to update an existing row rather than calling QuerySetCell() over and over :slight_smile:


#8

yep, that’s exactly what lead me to to propose this

@isapir yeah, basically just the ability to set the row number


#9

You can open a ticket for it in JIRA. IMO it’s a valid proposal but it will have to be approved before we implement it.


#10

ticket is here https://luceeserver.atlassian.net/browse/LDEV-1826