|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Can Bond deal with Rows returned from function via refcursorHi,
I'm very new to Bond and I am try to write a small application. Part of the application uses Plpg functions. I have taken this approach in the hope I might simplify some fairly complicated joins. In one case I use the following SQL to call my function: SELECT tetly_classic( "user entered variable", funcursor ); FETCH ALL IN funcursor; The query returns a number of columns and a number of rows. I do not have sufficient grasp of Bond yet to know whether this is possible. I have looked at the examples but have not spotted anything that might deal with this construct. I know that Plpg function can be used in Bond but this one has me stumped. Any clues greatly appreciated. Best Colin Close _______________________________________________ Bond-users mailing list Bond-users@... http://hcoop.net/cgi-bin/mailman/listinfo/bond-users |
|
|
Re: Can Bond deal with Rows returned from function via refcursorI've used pl/pg a lot for my applications. But i've only tried returning
record sets yet from pl/pg for combo dropdown boxes, not anything else. I've used pl/pg for the application logic mostly, not as a system for returning A number of features in bond require simplier SQL statements that the sql parser can understand, but its not essential. It will still work with complex sql statements but creating runtime dynamic joins wont work within bond because bond wont understand the SQL statement to add dynamic joins. The sort of things effected here are the search features and loadby features. Dynamic columns proberly wont work for inserting or updating data using bond. But selects should work fine. At programme startup bonddb queries the database and finds out all the tables and fields in the database and there default values etc which is then used when inserting or updating records. Everything goes though bonddb, so if bonddb can't handle it bond can't handle it. In complex situations in the past i've just created a test case in bonddb/bonddb/bonddbtest.c which demonstrates what i want to do and i see what breaks and fixed it to get working. Whats involved there is finding a test case similar to what you want to do and copy and paste it with your sql. Is there any other way around it other than returning dynamic record set? If you dont use curses and use return next in pl/pgsql does it work? so its ' SELECT * FROM somefunc(); ' instead. Thats how i've done it in the past. Does the record set need to be used for insert/updates ? Colin Close wrote: > Hi, > > I'm very new to Bond and I am try to write a small application. Part of > the application uses Plpg functions. I have taken this approach in the > hope I might simplify some fairly complicated joins. > > In one case I use the following SQL to call my function: > SELECT tetly_classic( "user entered variable", funcursor ); FETCH ALL IN funcursor; > > The query returns a number of columns and a number of rows. > > I do not have sufficient grasp of Bond yet to know whether this is possible. > I have looked at the examples but have not spotted anything that might > deal with this construct. > > I know that Plpg function can be used in Bond but this one has me stumped. > > Any clues greatly appreciated. > > Best > > Colin Close > > > > _______________________________________________ > Bond-users mailing list > Bond-users@... > http://hcoop.net/cgi-bin/mailman/listinfo/bond-users -- Andrew Hill treshna Enterprises Ltd Tel: 03 366 3649 Cel: 021 660 819 Web: www.treshna.com IT Consultancy - Websites - Database development - Computer tech support _______________________________________________ Bond-users mailing list Bond-users@... http://hcoop.net/cgi-bin/mailman/listinfo/bond-users |
| Free Forum Powered by Nabble | Forum Help |