CDatabaseEngine Class Reference

#include <DatabaseEngine.h>

Inheritance diagram for CDatabaseEngine:
[legend]
Collaboration diagram for CDatabaseEngine:
[legend]

Public Types

enum  threadpoolmsg_t { dbEnginePreShutdown = 0, dbEngineShutdown }
 

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
NS_DECL_SBIDATABASEENGINE 
CDatabaseEngine ()
 
virtual ~CDatabaseEngine ()
 
PRInt32 Collate (collationBuffers *aCollationBuffers, const NATIVE_CHAR_TYPE *aStr1, const NATIVE_CHAR_TYPE *aStr2)
 
- Public Member Functions inherited from sbIDatabaseEngine
PRInt32 SubmitQuery (in CDatabaseQueryPtr aDBQuery)
 Submit a query to the database engine for processing. More...
 
void closeDatabase (in AString aDatabaseGUID)
 Shutdown a database. More...
 
void dumpDatabase (in AString aDatabaseGUID, in nsIFile aOutFile)
 Dump the contents of a database to file. More...
 
void dumpMemoryStatistics ()
 Dump memory usage to the console. See components/dbengine/src/sqlite3.c#6625 for details. More...
 
long getCurrentMemoryUsage (in long flag)
 Get the current amount of memory in use for a given sqlite3 flag. More...
 
long getHighWaterMemoryUsage (in long flag)
 Get the high water mark memory in use for a given SQLite3 flag. More...
 
void releaseMemory ()
 Release all non-essential memory. Attempt to release all non-essential memory currently held by SQLite. An example of non-essential memory is memory used to cache database pages that are not currently in use. More...
 

Static Public Member Functions

static CDatabaseEngineGetSingleton ()
 

Protected Member Functions

NS_IMETHOD Init ()
 
NS_IMETHOD Shutdown ()
 
nsresult OpenDB (const nsAString &dbGUID, CDatabaseQuery *pQuery, sqlite3 **ppHandle)
 
nsresult CloseDB (sqlite3 *pHandle)
 
already_AddRefed
< QueryProcessorQueue
GetQueueByQuery (CDatabaseQuery *pQuery, PRBool bCreate=PR_FALSE)
 
already_AddRefed
< QueryProcessorQueue
CreateQueueFromQuery (CDatabaseQuery *pQuery)
 
PRInt32 SubmitQueryPrivate (CDatabaseQuery *pQuery)
 
already_AddRefed< nsIEventTarget > GetEventTarget ()
 

Static Protected Member Functions

static void PR_CALLBACK QueryProcessor (CDatabaseEngine *pEngine, QueryProcessorQueue *pQueue)
 

Friends

class QueryProcessorQueue
 

Additional Inherited Members

- Public Attributes inherited from sbIDatabaseEngine
const long DATABASE_MEMORYUSED = 0
 MEMORYUSED: total dynamically alocated memory use. More...
 
const long DATABASE_PAGECACHEUSED = 1
 
const long DATABASE_PAGECACHEOVERFLOW = 2
 
attribute boolean localeCollationEnabled
 This flag may be set to false to disable locale collation sequences (eg, for consistent unit tests regardless of locale and platform collation implementation) More...
 
readonly attribute AString localeCollationID
 Returns the identifier of the localized collation sequence. More...
 

Detailed Description

Definition at line 90 of file DatabaseEngine.h.

Member Enumeration Documentation

Enumerator
dbEnginePreShutdown 
dbEngineShutdown 

Definition at line 109 of file DatabaseEngine.h.

Constructor & Destructor Documentation

CDatabaseEngine::CDatabaseEngine ( )

Definition at line 948 of file DatabaseEngine.cpp.

CDatabaseEngine::~CDatabaseEngine ( )
virtual

Definition at line 968 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Member Function Documentation

nsresult CDatabaseEngine::CloseDB ( sqlite3 *  pHandle)
protected

Definition at line 1512 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

PRInt32 CDatabaseEngine::Collate ( collationBuffers aCollationBuffers,
const NATIVE_CHAR_TYPE *  aStr1,
const NATIVE_CHAR_TYPE *  aStr2 
)

Definition at line 2676 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

already_AddRefed< QueryProcessorQueue > CDatabaseEngine::CreateQueueFromQuery ( CDatabaseQuery pQuery)
protected

Definition at line 1733 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

already_AddRefed< nsIEventTarget > CDatabaseEngine::GetEventTarget ( )
protected

Definition at line 2400 of file DatabaseEngine.cpp.

Here is the caller graph for this function:

already_AddRefed< QueryProcessorQueue > CDatabaseEngine::GetQueueByQuery ( CDatabaseQuery pQuery,
PRBool  bCreate = PR_FALSE 
)
protected

Definition at line 1707 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CDatabaseEngine * CDatabaseEngine::GetSingleton ( )
static

Definition at line 990 of file DatabaseEngine.cpp.

Here is the call graph for this function:

NS_IMETHODIMP CDatabaseEngine::Init ( )
protected

Definition at line 1017 of file DatabaseEngine.cpp.

Here is the caller graph for this function:

nsresult CDatabaseEngine::OpenDB ( const nsAString &  dbGUID,
CDatabaseQuery pQuery,
sqlite3 **  ppHandle 
)
protected

Definition at line 1358 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PR_CALLBACK CDatabaseEngine::QueryProcessor ( CDatabaseEngine pEngine,
QueryProcessorQueue pQueue 
)
staticprotected

Definition at line 2084 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP CDatabaseEngine::Shutdown ( )
protected

Definition at line 1135 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

PRInt32 CDatabaseEngine::SubmitQueryPrivate ( CDatabaseQuery pQuery)
protected

Definition at line 1575 of file DatabaseEngine.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class QueryProcessorQueue
friend

Definition at line 94 of file DatabaseEngine.h.


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