grendel.storage.mdb
Interface nsIMdbEnv
- public abstract interface nsIMdbEnv
- extends nsIMdbObject
nsIMdbEnv: a context parameter used when calling most abstract db methods.
The main purpose of such an object is to permit a database implementation
to avoid the use of globals to share information between various parts of
the implementation behind the abstract db interface. An environment acts
like a session object for a given calling thread, and callers should use
at least one different nsIMdbEnv instance for each thread calling the API.
While the database implementation might not be threaded, it is highly
desirable that the db be thread-safe if calling threads use distinct
instances of nsIMdbEnv. Callers can stop at one nsIMdbEnv per thread, or they
might decide to make on nsIMdbEnv instance for every nsIMdbPort opened, so that
error information is segregated by database instance. Callers create
instances of nsIMdbEnv by calling the MakeEnv() method in nsIMdbFactory.
tracing: an environment might support some kind of tracing, and this
boolean attribute permits such activity to be enabled or disabled.
errors: when a call to the abstract db interface returns, a caller might
check the number of outstanding errors to see whether the operation did
actually succeed. Each nsIMdbEnv should have all its errors cleared by a
call to ClearErrors() before making each call to the abstract db API,
because outstanding errors might disable further database actions. (This
is not done inside the db interface, because the db cannot in general know
when a call originates from inside or outside -- only the app knows this.)
error hook: callers can install an instance of nsIMdbErrorHook to receive
error notifications whenever the error count increases. The hook can
be uninstalled by passing a null pointer.
GetErrorCount
public int GetErrorCount(int outCount,
boolean outShouldAbort)
GetWarningCount
public int GetWarningCount(int outCount,
boolean outShouldAbort)
GetDoTrace
public int GetDoTrace(boolean outDoTrace)
SetDoTrace
public int SetDoTrace(boolean inDoTrace)
GetAutoClear
public boolean GetAutoClear()
SetAutoClear
public void SetAutoClear(boolean inAutoClear)
GetErrorHook
public nsIMdbErrorHook GetErrorHook()
SetErrorHook
public void SetErrorHook(nsIMdbErrorHook ioErrorHook)
ClearErrors
public int ClearErrors()
ClearWarnings
public int ClearWarnings()
ClearErrorsAndWarnings
public int ClearErrorsAndWarnings()