- Conforms To:
- NSObject
- Declared In:
- RTSQLDataType.h
- - name
- - literalPrefix
- - literalSuffix
- - creatable
- - nativeDataTypeConstant
- - nativeDataType
- - setNativeDataType:
- - maxColSize
- - minScale
- - maxScale
- - preferredDisplaySize
- - shouldBeQuoted
- - acceptsNulls
- - fixedPrecision
- - autoIncrementing
- - supportsUnsigned
- - supportsLength
- - createParams
- - searchable
- - searchableWithLike
- - searchableWithOperator
- - compareValue:toValue:
- - valueAsString:
- - stringToNativeType:
- (BOOL)acceptsNulls
Returns YES if this data type supports NULL values. Defaults to YES if unknown.
- (BOOL)autoIncrementing
Returns YES if this data type supports a autoincrement/identity attribute. Defaults to NO.
- (NSComparisonResult)compareValue:(id)val1 toValue:(id)val2
Returns a NSComparisonResult after comparing two values of this data type.
- (BOOL)creatable
Returns YES if the plugin advises allowing users to create columns of this data type. NO would be returned for type aliases, system types, or types the plugin does not support.
- (NSString*)createParams
Returns a string with the parameters used for defining columns/variables of this data type (i.e. what appears in parentheses after the type name). Possible values are: (l)length, (L)length (if optional), (p)precision, (s)scale or a comma separating precision and scale.
- (BOOL)fixedPrecision
Returns YES if this this data type has a fixed size for the numeric precision. Defaults to NO.
- (NSString*)literalPrefix
Returns string to use as a opening quote for values of this type when used in a SQL query.
- (NSString*)literalSuffix
Returns string to use as a closing quote for values of this type when used in a SQL query.
- (UInt32)maxColSize
Returns the maximum size for columns of this data type. Returns zero if not-applicable to this data type.
- (SInt32)maxScale
For types with a scale, returns the minimum scale for that type.
- (SInt32)minScale
For types with a scale, returns the minimum scale for that type.
- (NSString*)name
Returns a user-presentable name for this data type.
- (NSString*)nativeDataType
Returns the name of the class (or struct if RTSQLDateTimeType) that will be returned for columns of this type.
- (UInt32)nativeDataTypeConstant
Returns one of the RTSQLType_XXX constants describing the format of data of this type.
- (SInt32)preferredDisplaySize
Returns the preferred width (in chars) of a column of this type, or 0 if unknown.
- (BOOL)searchable
Returns YES if this data type can be part of a WHERE clause. Defaults to YES.
- (BOOL)searchableWithLike
Returns YES if this data type can be used with the like operator. Defaults to NO if not specified by the plugin.
- (BOOL)searchableWithOperator
Returns YES if this data type be can be used with the standard relational operators such as '<', '>', '<=', '>=', '=', and '<>'. Defaults to YES if not specified by the plugin.
- (void)setNativeDataType:(NSString*)typeName
Sets the name of the class (or struct if RTSQLDateTimeType) that will be returned for columns of this type. Raises NSException if the typeName is not a supported return type for this data type.
- (BOOL)shouldBeQuoted
Returns YES if values of this type should be quoted when used in a SQL query.
- (void*)stringToNativeType:(NSString*)str
Returns value of str as the type returned by -nativeDataType
- (BOOL)supportsLength
No method description.
- (BOOL)supportsUnsigned
Returns YES if this data type supports adding an unsigned qualifier in column definitions. Defaults to NO.
- (NSString*)valueAsString:(void*)rawVal
Returns a string representation of rawVal (which must be the class returned by nativeDataType).