RBSQLiteFieldSchema Class Reference

Inherits from NSObject
Declared in RBSQLiteFieldSchema.h

Overview

Describes a SQLite table column.

  name

The field name, corresponds to the SQLite column name.

@property (nonatomic, readonly, nonnull) NSString *name

Declared In

RBSQLiteFieldSchema.h

  type

The data type.

@property (nonatomic, readonly) RBSQLiteFieldType type

Declared In

RBSQLiteFieldSchema.h

  allowsNull

Determines if the null values are allowed for this field in the corresponding SQLite column.

@property (nonatomic, readonly) BOOL allowsNull

Declared In

RBSQLiteFieldSchema.h

  autoincrement

Determines if this field should autoincrement, in this case the field type should be an integer.

@property (nonatomic, readonly) BOOL autoincrement

Declared In

RBSQLiteFieldSchema.h

  isPrimaryKey

Determines if this is the primary key field.

@property (nonatomic, readonly) BOOL isPrimaryKey

Declared In

RBSQLiteFieldSchema.h

– initWithName:type:allowsNull:

Initializes a new RBSQLiteFieldSchema object that describes a SQLite table column.

- (nonnull instancetype)initWithName:(nonnull NSString *)name type:(RBSQLiteFieldType)type allowsNull:(BOOL)allowsNull

Parameters

name

The name of the field, corresponds to the SQLite column name.

type

The data type of this field.

allowsNull

Set to YES to allow null values to be used in the corresponding SQLite column.

Return Value

A newly initialized and populated RBSQLiteFieldSchema object.

Declared In

RBSQLiteFieldSchema.h

– initPrimaryKeyWithName:type:

Initializes a new RBSQLiteFieldSchema object that describes the primary key column for an SQLite table.

- (nonnull instancetype)initPrimaryKeyWithName:(nonnull NSString *)name type:(RBSQLiteFieldType)type

Parameters

name

The name of the field, corresponds to the SQLite column name.

type

The data type of this field.

Return Value

A newly initialized and populated RBSQLiteFieldSchema object.

Declared In

RBSQLiteFieldSchema.h

– createTableFieldQueryString

Creates a query string fragment to to be used as part of an SQL CREATE TABLE query.

- (nonnull NSString *)createTableFieldQueryString

Return Value

Returns a formatted SQL query string fragment.

Declared In

RBSQLiteFieldSchema.h