net.rim.device.api.database
Class Pragma

java.lang.Object
  extended by net.rim.device.api.database.Pragma

public final class Pragma
extends Object

String constants for all supported database PRAGMAs.

Since:
BlackBerry API 7.0.0

Field Summary
static String COLLATION_LIST
          Returns a list of the collating sequences defined for the current database connection.
static String COMPILE_OPTIONS
          Returns the names of the compile-time options used when building SQLite, one option per row.
static String DATABASE_LIST
          Returns one row for each database attached to the current database connection.
static String FOREIGN_KEYS
          Queries, sets, or clears the enforcement of foreign key constraints.
static String FREELIST_COUNT
          Returns the number of unused pages in the database file.
static String INTEGRITY_CHECK
          This pragma does an integrity check of the entire database.
static String JOURNAL_MODE
          Queries or changes the journal mode of the current database connection.
static String JOURNAL_SIZE_LIMIT
          Queries or changes the journal size limit in bytes.
static String PAGE_COUNT
          Returns the total number of pages in the database file.
static String QUICK_CHECK
          This pragma is like integrity_check except that it does not verify that index content matches table content.
static String SYNCHRONOUS
          Queries or changes the synchronous setting of a database.
static String USER_VERSION
          Gets or sets the value of the user-version which is a 32-bit signed integer stored in the database header.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

COMPILE_OPTIONS

public static final String COMPILE_OPTIONS
Returns the names of the compile-time options used when building SQLite, one option per row.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

COLLATION_LIST

public static final String COLLATION_LIST
Returns a list of the collating sequences defined for the current database connection.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

DATABASE_LIST

public static final String DATABASE_LIST
Returns one row for each database attached to the current database connection. Columns of the result set include the index and the name the database was attached with. The first row will be for the main database. The second row will be for the database used to store temporary tables.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

FOREIGN_KEYS

public static final String FOREIGN_KEYS
Queries, sets, or clears the enforcement of foreign key constraints.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

FREELIST_COUNT

public static final String FREELIST_COUNT
Returns the number of unused pages in the database file. Useful for determining when to run a VACUUM command.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

INTEGRITY_CHECK

public static final String INTEGRITY_CHECK
This pragma does an integrity check of the entire database. It looks for out-of-order records, missing pages, malformed records, and corrupt indices. If any problems are found, then strings are returned (as multiple rows with a single column per row) which describe the problems. At most integer errors will be reported before the analysis quits. The default value for integer is 100. If no errors are found, a single row with the value "ok" is returned. Note: The quick_check pragma runs much faster but does not verify index content.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

JOURNAL_MODE

public static final String JOURNAL_MODE
Queries or changes the journal mode of the current database connection. Available settings are DELETE, TRUNCATE, PERSIST, MEMORY, WAL or OFF. It can only be changed when no transactions are active. When a database is first opened, the journal_mode is set to DELETE (a rollback journal is deleted at the end of each transaction).

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

JOURNAL_SIZE_LIMIT

public static final String JOURNAL_SIZE_LIMIT
Queries or changes the journal size limit in bytes.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

PAGE_COUNT

public static final String PAGE_COUNT
Returns the total number of pages in the database file.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

QUICK_CHECK

public static final String QUICK_CHECK
This pragma is like integrity_check except that it does not verify that index content matches table content. By skipping the verification of index content, quick_check is able to run much faster than integrity_check. Otherwise the two pragmas are the same.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

SYNCHRONOUS

public static final String SYNCHRONOUS
Queries or changes the synchronous setting of a database. Available settings are OFF (0), NORMAL (1) or FULL (2). The FULL mode is the safest but also the slowest mode and is used by default; NORMAL pauses at critical moments but less often than FULL; OFF means that the engine will not pause at all, providing the best performance but with the highest chance of data loss.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

USER_VERSION

public static final String USER_VERSION
Gets or sets the value of the user-version which is a 32-bit signed integer stored in the database header.

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal