java.lang.Object |
↳ |
com.tencent.wcdb.support.Context |
Class Overview
Wrapper class to implement database opening methods as android.content.Context
does.
Summary
Public Methods |
static
SQLiteDatabase
|
openOrCreateDatabase(Context context, String name, int mode, SQLiteDatabase.CursorFactory factory)
Open a new private SQLiteDatabase associated with this Context's
application package.
|
static
SQLiteDatabase
|
openOrCreateDatabase(Context context, String name, byte[] password, SQLiteCipherSpec cipher, int mode, SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler)
|
static
SQLiteDatabase
|
openOrCreateDatabase(Context context, String name, int mode, SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler)
|
static
SQLiteDatabase
|
openOrCreateDatabase(Context context, String name, byte[] password, SQLiteCipherSpec cipher, int mode, SQLiteDatabase.CursorFactory factory)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
int
MODE_ENABLE_WRITE_AHEAD_LOGGING
Constant Value:
8
(0x00000008)
Public Constructors
Public Methods
public
static
SQLiteDatabase
openOrCreateDatabase
(Context context, String name, int mode, SQLiteDatabase.CursorFactory factory)
Open a new private SQLiteDatabase associated with this Context's
application package. Create the database file if it doesn't exist.
Parameters
name |
The name (unique in the application package) of the database. |
mode |
Operating mode. Use 0 or MODE_PRIVATE for the
default operation. Use
MODE_ENABLE_WRITE_AHEAD_LOGGING to enable write-ahead
logging by default. Use MODE_NO_LOCALIZED_COLLATORS
to disable localized collators. |
factory |
An optional factory class that is called to instantiate a
cursor when query is called. |
Returns
- The contents of a newly created database with the given name.
Throws
SQLiteException
| if the database file
could not be opened.
|