databaseManager.getFoundSetQuery(foundset)

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

databaseManager.getFoundSetQuery(foundset)

Postby patrick » Sun Apr 24, 2005 6:08 pm

Hello,

would this

Code: Select all
databaseManager.getFoundSetQuery(foundset)


be possible? The function should return the SQL statement that was generated when retrieving "foundset". I can't imagine this too be hard to implement :) and see (at least) the following possibilities:

1. Offer "search in results" feature when doing SQL based searches in Servoy (you can reuse the foundset in SQL since you know then the query that created it)

2. Show a foundset definition in a form: in some areas it is extremely helpful to know what selection of data you have in front of you (especially in reporting). With this function you could interpret the WHERE-clause and show the criteria in readable form

And most important in my situation

3. Be able to do mass operation on data using SQL: if your users search for whatever they like and want to start a database intensive job on that data, we currently have to loop, because we don't know what the user search for. If we had access to the foundset query we could reuse that for further operations (subqueries etc.).

Is that possible? :lol:

Thanks
Patrick
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby patrick » Tue Apr 26, 2005 10:48 pm

Found a forth occasion where this comes in handy: restoring the users selection at a later point. I can image some areas where this is very useful.

Are there any comments on this?
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby patrick » Mon Jul 04, 2005 7:09 pm

Hello,

I have to ask again, because I think I really need this. I can image this to be a foundset property, too. Then I could do a

Code: Select all
foundset.query


or

Code: Select all
foundset.getQuery()


Can this be done?

Thanks
Patrick
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby jcompagner » Thu Jul 14, 2005 3:40 pm

need to check this with Jan B. How and if we are going to support this.
For example what about the data there is in the query?
Our queries don't have data inside queries, but are all using prepared statements..
So you would get:

select X from Y where z = ? and t = ?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby patrick » Thu Jul 14, 2005 6:55 pm

and couldn't I get the arguments array as well? Maybe

Code: Select all
foundset.getQuery()


delivers

Code: Select all
select X from Y where z = ? and t = ?


and

Code: Select all
foundset.getQueryArguments()


delivers an Array of arguments? Without arguments I can't use it...
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby Jan Aleman » Tue Dec 27, 2005 5:34 pm

Is on the todo for 3.0
*NOTE: as usually this is not a 100% guarantee but in general this means it will get in
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron