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 » Sqlite: Missing GetTransactionLevel() Method - Implemented
Sqlite: Missing GetTransactionLevel() Method - Implemented [message #29116] Wed, 06 October 2010 00:40 Go to next message
zsolt is currently offline  zsolt
Messages: 696
Registered: December 2005
Location: Budapest, Hungary
Contributor
It is useful for me:

Sqlite3Session class declaration (plugin/sqlite3/Sqlite3.h):
	virtual int    GetTransactionLevel() const;


Implementation (plugin/sqlite3/Sqlite3upp.cpp):
int Sqlite3Session::GetTransactionLevel() const
{
	int autocommit = sqlite3_get_autocommit(db);
	return (autocommit ? 0 : 1);
}
Re: Sqlite: Missing GetTransactionLevel() Method - Implemented [message #29268 is a reply to message #29116] Wed, 13 October 2010 19:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Applied. Thanks (although I am now pretty uncertain that anybody should develop SQL apps based on this - today I run in autocommit most of time, only activating SINGLE transaction level from time to time...)
Re: Sqlite: Missing GetTransactionLevel() Method - Implemented [message #29282 is a reply to message #29268] Wed, 13 October 2010 22:02 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 696
Registered: December 2005
Location: Budapest, Hungary
Contributor
Me too, but in some functions I want to be sure, that the function is called within a transaction, so I'm using a line:
ASSERT(sql.GetTransactionLevel());
Re: Sqlite: Missing GetTransactionLevel() Method - Implemented [message #29329 is a reply to message #29282] Fri, 15 October 2010 14:33 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
zsolt wrote on Wed, 13 October 2010 16:02

Me too, but in some functions I want to be sure, that the function is called within a transaction, so I'm using a line:
ASSERT(sql.GetTransactionLevel());



OK, that is reasonable Wink
Previous Topic: [SQLITE] Enable FTS in compiler options by default
Next Topic: Select a month in SQL
Goto Forum:
  


Current Time: Tue Apr 16 18:44:18 CEST 2024

Total time taken to generate the page: 0.02839 seconds