DatabaseOptions

DatabaseOptions

Options for opening a Database using the Manager method 'openDatabase'.

Syntax


@interface CBLDatabaseOptions : NSObject
class CBLDatabaseOptions : NSObject
public class DatabaseOptions
public class DatabaseOptions
public class DatabaseOptions

Summary


Constructors
Initializes a DatabaseOptions with Create=false, ReadOnly=false, StorageType=null, EncryptionKey=null.
Properties
boolean
Create { get; set; }
Whether 'openDatabase' will create a Database if it doesn't already exist. (Defaults to false.)
Object
EncryptionKey { get; set; }
The encryption key for the Database file. A null value (the default) means it's unencrypted.
boolean
ReadOnly { get; set; }
Whether changes to the database are disallowed. (Defaults to false.)
String
StorageType { get; set; }
The storage engine (SQLite or ForestDB) to create the database with or convert it to. Ignored if null (the default.)

Constructors


DatabaseOptions()
Initializes a DatabaseOptions with Create=false, ReadOnly=false, StorageType=null, EncryptionKey=null.

Syntax

-(instancetype)init
CBLDatabaseOptions()
public DatabaseOptions()
public DatabaseOptions()
public DatabaseOptions()

Properties


boolean Create { get; set; }
Whether 'openDatabase' will create a Database if it doesn't already exist. (Defaults to false.)

Syntax

@property BOOL create
var create: Bool
public boolean isCreate()
public void setCreate(boolean create)
public boolean isCreate()
public void setCreate(boolean create)
public bool Create { get; set; }
Object EncryptionKey { get; set; }
The encryption key for the Database file. A null value (the default) means it's unencrypted.

Syntax

@property id encryptionKey
var encryptionKey: AnyObject
public Object getEncryptionKey()
public void setEncryptionKey(Object encryptionKey)
public Object getEncryptionKey()
public void setEncryptionKey(Object encryptionKey)
public SymmetricKey EncryptionKey { get; set; }
boolean ReadOnly { get; set; }
Whether changes to the database are disallowed. (Defaults to false.)

Syntax

@property BOOL readOnly
var readOnly: Bool
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
public bool ReadOnly { get; set; }
String StorageType { get; set; }
The storage engine (SQLite or ForestDB) to create the database with or convert it to. Ignored if null (the default.)

Syntax

@property (copy) NSString* storageType
var storageType: String
public String getStorageType()
public void setStorageType(String storageType)
public String getStorageType()
public void setStorageType(String storageType)
public string StorageType { get; set; }