Logo Search packages:      
Sourcecode: f-spot version File versions

Banshee::Database::QueuedSqliteDatabase Class Reference

Inheritance diagram for Banshee::Database::QueuedSqliteDatabase:

List of all members.

Detailed Description

A thread-safe wrapper for SQLite.

SQLite is not thread-safe by default on Linux. Therefor, we handle all SQL queries on a seperate thread.

Definition at line 46 of file QueuedSqliteDatabase.cs.

Public Member Functions

override void Add (TKey key, TValue value)
void BeginTransaction ()
override void Clear ()
void CommitTransaction ()
 DisposableCache (int max_count)
 DisposableCache ()
void Dispose ()
delegate void ExceptionThrownHandler (Exception e)
int Execute (object command)
int Execute (DbCommand command)
void ExecuteNonQuery (object command)
void ExecuteNonQuery (DbCommand command)
int GetFileVersion (string path)
SqliteDataReader Query (object command)
SqliteDataReader Query (DbCommand command)
object QuerySingle (object command)
object QuerySingle (DbCommand command)
 QueuedSqliteDatabase (string dbpath)
override void Remove (TKey key)
void RollbackTransaction ()
bool TableExists (string table)

Protected Member Functions

virtual void Dispose (bool is_disposing)


bool InTransaction [get]


ExceptionThrownHandler ExceptionThrown

Private Member Functions

void ProcessQueue ()
void QueueCommand (QueuedSqliteCommand command)
void WaitForConnection ()

Private Attributes

bool already_disposed = false
Queue< QueuedSqliteCommand > command_queue = new Queue<QueuedSqliteCommand>()
 Holds queries to be executed.
volatile bool connected
SqliteConnection connection
volatile Thread current_transaction_thread = null
 Thread currently executing the transaction.
string dbpath
volatile bool dispose_requested = false
AutoResetEvent queue_signal = new AutoResetEvent(false)
 Signal used to indicate there is new data in the command_queue.
Thread queue_thread
AutoResetEvent transaction_signal = new AutoResetEvent(true)
 Threads will sleep on this signal if there's a transaction active.
int version

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index