# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# SQLiteDatabase.OpenParams.Builder

`public static final class SQLiteDatabase.OpenParams.Builder`
`extends Object` ``

java.lang.Object
↳ | android.database.sqlite.SQLiteDatabase.OpenParams.Builder

Builder for `OpenParams`.

## Summary

### Public constructors
`Builder()`
`Builder(SQLiteDatabase.OpenParams params)`

### Public methods
`SQLiteDatabase.OpenParams.Builder` | `addOpenFlags(int openFlags)` Adds flags to control database access mode
`SQLiteDatabase.OpenParams` | `build()` Creates an instance of `OpenParams` with the options that were previously set on this builder
`SQLiteDatabase.OpenParams.Builder` | `removeOpenFlags(int openFlags)` Removes database access mode flags
`SQLiteDatabase.OpenParams.Builder` | `setCursorFactory(SQLiteDatabase.CursorFactory cursorFactory)` Set an optional factory class that is called to instantiate a cursor when query is called.
`SQLiteDatabase.OpenParams.Builder` | `setErrorHandler(DatabaseErrorHandler errorHandler)` Sets `DatabaseErrorHandler` object to handle db corruption errors
`SQLiteDatabase.OpenParams.Builder` | `setIdleConnectionTimeout(long idleConnectionTimeoutMs)` This method is deprecated. DO NOT USE this method. See the javadoc for the details.
`SQLiteDatabase.OpenParams.Builder` | `setJournalMode(String journalMode)` Sets journal mode to use when `SQLiteDatabase#ENABLE_WRITE_AHEAD_LOGGING` flag is not set.
`SQLiteDatabase.OpenParams.Builder` | `setLookasideConfig(int slotSize, int slotCount)` Configures lookaside memory allocator SQLite default settings will be used, if this method isn't called.
`SQLiteDatabase.OpenParams.Builder` | `setOpenFlags(int openFlags)` Sets flags to control database access mode
`SQLiteDatabase.OpenParams.Builder` | `setSynchronousMode(String syncMode)` w Sets synchronous mode .

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### Builder

    public Builder ()

### Builder

    public Builder (SQLiteDatabase.OpenParams params)

Parameters
`params` | `SQLiteDatabase.OpenParams`

## Public methods

### addOpenFlags

    public SQLiteDatabase.OpenParams.Builder addOpenFlags (int openFlags)

Adds flags to control database access mode

Parameters
`openFlags` | `int`: The new flags to add Value is either `0` or a combination of `SQLiteDatabase.OPEN_READWRITE`, `SQLiteDatabase.OPEN_READONLY`, `SQLiteDatabase.CREATE_IF_NECESSARY`, `SQLiteDatabase.NO_LOCALIZED_COLLATORS`, and `SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING`

Returns
`SQLiteDatabase.OpenParams.Builder` | same builder instance for chaining multiple calls into a single statement This value cannot be `null`.

### build

    public SQLiteDatabase.OpenParams build ()

Creates an instance of `OpenParams` with the options that were previously set on this builder

Returns
`SQLiteDatabase.OpenParams` | This value cannot be `null`.

### removeOpenFlags

    public SQLiteDatabase.OpenParams.Builder removeOpenFlags (int openFlags)

Removes database access mode flags

Parameters
`openFlags` | `int`: Flags to remove Value is either `0` or a combination of `SQLiteDatabase.OPEN_READWRITE`, `SQLiteDatabase.OPEN_READONLY`, `SQLiteDatabase.CREATE_IF_NECESSARY`, `SQLiteDatabase.NO_LOCALIZED_COLLATORS`, and `SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING`

Returns
`SQLiteDatabase.OpenParams.Builder` | same builder instance for chaining multiple calls into a single statement This value cannot be `null`.

### setCursorFactory

    public SQLiteDatabase.OpenParams.Builder setCursorFactory (SQLiteDatabase.CursorFactory cursorFactory)

Set an optional factory class that is called to instantiate a cursor when query is called.

Parameters
`cursorFactory` | `SQLiteDatabase.CursorFactory`: instance This value may be `null`.

Returns
`SQLiteDatabase.OpenParams.Builder` | same builder instance for chaining multiple calls into a single statement This value cannot be `null`.

### setErrorHandler

    public SQLiteDatabase.OpenParams.Builder setErrorHandler (DatabaseErrorHandler errorHandler)

Sets `DatabaseErrorHandler` object to handle db corruption errors

Parameters
`errorHandler` | `DatabaseErrorHandler`: This value may be `null`.

Returns
`SQLiteDatabase.OpenParams.Builder` | This value cannot be `null`.

### setIdleConnectionTimeout

    public SQLiteDatabase.OpenParams.Builder setIdleConnectionTimeout (long idleConnectionTimeoutMs)

This method is deprecated.
DO NOT USE this method. See the javadoc for the details.

Sets the maximum number of milliseconds that SQLite connection is allowed to be idle before it is closed and removed from the pool.

DO NOT USE this method. This feature has negative side effects that are very hard to foresee.

A connection timeout allows the system to internally close a connection to a SQLite database after a given timeout, which is good for reducing app's memory consumption. However the side effect is it will reset all of SQLite's per-connection states, which are typically modified with a `PRAGMA` statement, and these states will not be restored when a connection is re-established internally, and the system does not provide a callback for an app to reconfigure a connection. This feature may only be used if an app relies on none of such per-connection states.

Parameters
`idleConnectionTimeoutMs` | `long`: timeout in milliseconds. Use `Long#MAX_VALUE` to allow unlimited idle connections. Value is 0 or greater

Returns
`SQLiteDatabase.OpenParams.Builder` | This value cannot be `null`.

See also:

- `SQLiteOpenHelper.setIdleConnectionTimeout(long)`

### setJournalMode

    public SQLiteDatabase.OpenParams.Builder setJournalMode (String journalMode)

Sets journal mode to use when `SQLiteDatabase#ENABLE_WRITE_AHEAD_LOGGING` flag is not set.

Parameters
`journalMode` | `String`: This value cannot be `null`.

Returns
`SQLiteDatabase.OpenParams.Builder` | This value cannot be `null`.

### setLookasideConfig

    public SQLiteDatabase.OpenParams.Builder setLookasideConfig (int slotSize,
                    int slotCount)

Configures lookaside memory allocator

SQLite default settings will be used, if this method isn't called. Use `setLookasideConfig(0,0)` to disable lookaside

Note: Provided slotSize/slotCount configuration is just a recommendation. The system may choose different values depending on a device, e.g. lookaside allocations can be disabled on low-RAM devices

Parameters
`slotSize` | `int`: The size in bytes of each lookaside slot. Value is 0 or greater
`slotCount` | `int`: The total number of lookaside memory slots per database connection. Value is 0 or greater

Returns
`SQLiteDatabase.OpenParams.Builder` |

### setOpenFlags

    public SQLiteDatabase.OpenParams.Builder setOpenFlags (int openFlags)

Sets flags to control database access mode

Parameters
`openFlags` | `int`: The new flags to set Value is either `0` or a combination of `SQLiteDatabase.OPEN_READWRITE`, `SQLiteDatabase.OPEN_READONLY`, `SQLiteDatabase.CREATE_IF_NECESSARY`, `SQLiteDatabase.NO_LOCALIZED_COLLATORS`, and `SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING`

Returns
`SQLiteDatabase.OpenParams.Builder` | same builder instance for chaining multiple calls into a single statement This value cannot be `null`.

See also:

- `SQLiteDatabase.OPEN_READWRITE`
- `SQLiteDatabase.OPEN_READONLY`
- `SQLiteDatabase.CREATE_IF_NECESSARY`
- `SQLiteDatabase.NO_LOCALIZED_COLLATORS`
- `SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING`

### setSynchronousMode

    public SQLiteDatabase.OpenParams.Builder setSynchronousMode (String syncMode)

w Sets synchronous mode .

Parameters
`syncMode` | `String`: This value cannot be `null`.

Returns
`SQLiteDatabase.OpenParams.Builder` | This value cannot be `null`.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*