mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.Sqlite3: GetTransactionLevel (thanks zsolt)
git-svn-id: svn://ultimatepp.org/upp/trunk@2779 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
59018d02fe
commit
61600c432a
2 changed files with 8 additions and 2 deletions
|
|
@ -25,6 +25,7 @@ public:
|
|||
virtual Vector<String> EnumTables(String database);
|
||||
virtual Vector<String> EnumViews(String database);
|
||||
virtual Vector<SqlColumnInfo> EnumColumns(String database, String table);
|
||||
virtual int GetTransactionLevel() const;
|
||||
|
||||
// Some opaque structures used by the sqlite3 library
|
||||
typedef struct sqlite3 sqlite3;
|
||||
|
|
|
|||
|
|
@ -459,6 +459,11 @@ Vector<String> Sqlite3Session::EnumViews(String database) {
|
|||
return out;
|
||||
}
|
||||
|
||||
int Sqlite3Session::GetTransactionLevel() const
|
||||
{
|
||||
int autocommit = sqlite3_get_autocommit(db);
|
||||
return (autocommit ? 0 : 1);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue