StorageOptions

open class StorageOptions : ObjectBase

Options for offline storage of data from a DataService.

  • Store boolean values as SQL boolean type.

    Declaration

    Swift

    public static let storeBooleanAsSqlBoolean: Int
  • Store boolean values as numbers 1 (true) and 0 (false).

    Declaration

    Swift

    public static let STORE_BOOLEAN_AS_NUMBER_1_0: Int
  • Store boolean values as strings “Y” (true) and “N” (false).

    Declaration

    Swift

    public static let storeBooleanAsStringYN: Int
  • Is the database embedded within the application? Defaults to false.

    Declaration

    Swift

    final public var isEmbedded: Bool
  • Name of the database. Used as a base name for the databaseFile.

    Declaration

    Swift

    final public var databaseName: String?
  • Name of database file on local file system.

    Declaration

    Swift

    final public var databaseFile: String?
  • Type of database, e.g. “SQL Anywhere 16.0”

    Declaration

    Swift

    final public var databaseType: String?
  • Should database identifiers (e.g. table/column names) be quoted. Defaults to true.

    Declaration

    Swift

    final public var quotedIdentifiers: Bool
  • Optional schema name for all tables in this schema.

    Declaration

    Swift

    final public var schemaName: String?
  • Optional schema version for all tables in this schema.

    Declaration

    Swift

    final public var schemaVersion: String?
  • Optional prefix for all table names in this schema.

    Declaration

    Swift

    final public var tablePrefix: String?
  • Optional suffix for all table names in this schema.

    Declaration

    Swift

    final public var tableSuffix: String?
  • Optional prefix for all column names in this schema.

    Declaration

    Swift

    final public var columnPrefix: String?
  • Where applicable, holds the column name used to hold the backend ETag. Otherwise unused. Defaults to “backend_etag”.

    Declaration

    Swift

    final public var backendEtagColumn: String
  • Backend ETag length.

    Declaration

    Swift

    final public var backendEtagLength: Int
  • Where applicable, holds the column name used to hold the client ID. Otherwise unused. Defaults to “client_id”.

    Declaration

    Swift

    final public var clientIDColumn: String
  • If SQLDatabaseProvider.enableChangeTracking is true, this holds the column name used for identifying the deletion status of rows. Otherwise unused. Defaults to “is_deleted”.

    Declaration

    Swift

    final public var isDeletedColumn: String
  • If SQLDatabaseProvider.enableChangeTracking is true, this holds the column name used for identifying the modification time of rows. Otherwise unused. Defaults to “last_modified”.

    Declaration

    Swift

    final public var lastModifiedColumn: String
  • Where applicable, holds the column name used to hold the offline key. Otherwise unused. Defaults to “offline_key”.

    Declaration

    Swift

    final public var offlineKeyColumn: String
  • Where applicable, holds the column name used to hold the offline state. Otherwise unused. Defaults to “offline_state”.

    Declaration

    Swift

    final public var offlineStateColumn: String
  • Where applicable, holds the column name used to hold the row version. Otherwise unused. Defaults to “row_version”.

    Declaration

    Swift

    final public var rowVersionColumn: String
  • Should the data service create tables if they don’t exist already (defaults to true).

    Declaration

    Swift

    final public var createTables: Bool
  • Enables offline storage of links for navigation properties.

    Declaration

    Swift

    final public var offlineLinks: Bool
  • Database connection string.

    Declaration

    Swift

    final public var databaseURL: String?
  • Database username.

    Declaration

    Swift

    final public var databaseUsername: String?
  • Database password.

    Declaration

    Swift

    final public var databasePassword: String?
  • Database connection class.

    Declaration

    Swift

    final public var driverClass: String?
  • Database connection library.

    Declaration

    Swift

    final public var driverLibrary: String?
  • Is pooling of database connections permitted? Defaults to false. Should be set to false in application server environments with container-managed connections that cannot be safely reused across requests.

    Declaration

    Swift

    final public var poolConnections: Bool
  • The default Property.maxLength when not specified for complex-typed columns (including collections). Defaults to 50000.

    Declaration

    Swift

    final public var complexLength: Int
  • The default Property.maxLength when not specified for varying-length columns. Defaults to 500.

    Declaration

    Swift

    final public var defaultLength: Int
  • The default Property.precision when not specified for decimal/integer columns. Defaults to 25.

    Declaration

    Swift

    final public var defaultPrecision: Int
  • The maximum Property.scale when specified as ‘variable’ for decimal columns. Defaults to 10.

    Declaration

    Swift

    final public var variableScale: Int
  • The precision for decimal storage of DayTimeDuration values (expressed as seconds with optional fraction). Defaults to 20.

    Declaration

    Swift

    final public var durationPrecision: Int
  • The scale for decimal storage of DayTimeDuration values (expressed as seconds with optional fraction). Defaults to 6.

    Declaration

    Swift

    final public var durationScale: Int
  • The longest permitted length for a non-BLOB/CLOB column (e.g. varbinary/varchar). Defaults to 5000. Column storage for columns needing more than this length will use BLOB/CLOB types.

    Declaration

    Swift

    final public var longestNonLOB: Int
  • Option for storage of boolean properties. Defaults to STORE_BOOLEAN_AS_SQL_BOOLEAN.

    See also

    STORE_BOOLEAN_AS_NUMBER_1_0, STORE_BOOLEAN_AS_STRING_Y_N.

    Declaration

    Swift

    final public var storeBooleanAsType: Int
  • Should backend entity tag be stored (in a separate column from row version)? Defaults to false.

    Declaration

    Swift

    final public var storeBackendEtag: Bool
  • Should entity tag be stored (in a separate column from media data)? Defaults to true.

    Declaration

    Swift

    final public var storeMediaEtag: Bool
  • Should media type be stored (in a separate column from media data)? Defaults to true.

    Declaration

    Swift

    final public var storeMediaType: Bool
  • If storeMediaEtag is true, then the column name suffix used for storing entity tag.

    Declaration

    Swift

    final public var mediaEtagColumnSuffix: String
  • If storeMediaType is true, then the column name suffix used for storing media type.

    Declaration

    Swift

    final public var mediaTypeColumnSuffix: String
  • Column name for CLOB storage of entity internal data.

    See also

    storeInternalData.

    Declaration

    Swift

    final public var internalClobColumn: String
  • Column name for non-CLOB storage of entity internal data.

    See also

    storeInternalData.

    Declaration

    Swift

    final public var internalDataColumn: String
  • Length of non-CLOB column for storage of internal data.

    See also

    storeInternalData.

    Declaration

    Swift

    final public var internalDataLength: Int
  • Enable storing of entity internal data in the database (where applicable). Defaults to false.

    See also

    EntityValue.internalData.

    Declaration

    Swift

    final public var storeInternalData: Bool
  • Default initializer.

    Declaration

    Swift

    override public init()