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 » Community » U++ community news and announcements » SQL refactored, adding per-thread option, added second SQLR
SQL refactored, adding per-thread option, added second SQLR [message #34760] Sat, 10 December 2011 17:10 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
SQL, 'global SQL session/cursor', is now refactored so that each thread is allowed to assign its own SqlSession to SQL.

Unless this is assigned, SQL defaults to 'global SQL', the first one that was assigned.

This way, it is possible to support both "single DB session per whole program" (only main thread assigns SQL) - in that case using SQL has to be serialized (mutexes). And it is also possible to have per-thread SQL (if thread assigns it).

I have also noticed that there is quite common pattern to use two SQL sessions - one for read/write master DB, second for read-only slaves. Read operations are then performed on slaves, which unloads master DB.

So support this, I have introduced secondary 'global cursor/session', SQLR. If not assigned, it defaults to session defined for SQL. Of course, global/per-thread behaviour is the same.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Testers wanted for new .deb packages
Next Topic: U++ logging refactored
Goto Forum:
  


Current Time: Wed May 08 05:51:43 CEST 2024

Total time taken to generate the page: 0.02816 seconds