Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Implementing PostgreSql returning statement
Implementing PostgreSql returning statement [message #50044] Tue, 26 June 2018 19:43 Go to next message
busiek is currently online  busiek
Messages: 64
Registered: February 2011
Location: Poland
Member
Hi all,

For my needs I implemented PostgreSql returning statement. Using it is much faster then calling GetInsertedId(). You can use such code:
int id = SQL % Insert(TABLE)(COLUMN1, value1)(COLUMN2, value2).Returning(ID);
I attach a patch. I am not sure whether it could be added to official sources because it is PostgreSql specific.
Re: Implementing PostgreSql returning statement [message #50045 is a reply to message #50044] Tue, 26 June 2018 19:52 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Yes, that would be a great addition. I have plenty GetInsertedId's and I'm using Postgres Smile
Re: Implementing PostgreSql returning statement [message #50046 is a reply to message #50045] Wed, 27 June 2018 10:11 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Applied. Thank you.

Mirek

Previous Topic: SOLVED MySQL on remote DB: timeout or other issue
Next Topic: PostgreSQL NaN fetching from DB
Goto Forum:
  


Current Time: Fri Apr 19 19:46:08 CEST 2024

Total time taken to generate the page: 0.01279 seconds