
Classes | |
| class | _ColumnType |
Public Member Functions | |
| NSArray< EOSQLExpression > | _createExpressions () |
| NSArray< EOSQLExpression > | _deleteExpressions () |
| EOAttribute | _newAttribute (EOEntity entity) |
| EOAttribute | _newAttribute () |
| NSArray< EOSQLExpression > | _renameToExpressions (String newName) |
| void | _setAllowsNull (boolean allowsNull) |
| void | _setForeignKeyDestination (ERXMigrationColumn foreignKeyDestination) |
| void | _setName (String name) |
| void | _setNew (boolean isNew) |
| void | _setOverrideExternalType (String overrideExternalType) |
| void | _setOverrideValueType (String overrideValueType) |
| void | _setPrecision (int precision) |
| void | _setPrimaryKey (boolean primaryKey) |
| void | _setScale (int scale) |
| void | _setWidth (int width) |
| boolean | allowsNull () |
| void | create () throws SQLException |
| Object | defaultValue () |
| void | delete () throws SQLException |
| ERXMigrationColumn | foreignKeyDestination () |
| boolean | isNew () |
| boolean | isPrimaryKey () |
| String | name () |
| String | overrideExternalType () |
| String | overrideValueType () |
| int | precision () |
| void | renameTo (String newName) throws SQLException |
| int | scale () |
| void | setAllowsNull (boolean allowsNull) throws SQLException |
| void | setDataType (int jdbcType, int scale, int precision, int width, NSDictionary options) throws SQLException |
| void | setDefaultValue (Object defaultValue) |
| void | setNumericType (int jdbcType, int scale, int precision, NSDictionary options) throws SQLException |
| void | setWidthType (int jdbcType, int width, NSDictionary options) throws SQLException |
| ERXMigrationTable | table () |
| int | width () |
Static Public Attributes | |
| static final boolean | AllowsNull = true |
| static final boolean | NotNull = false |
| static final String | NULL_VALUE_TYPE = "___NULL_VALUE_TYPE___" |
Protected Member Functions | |
| ERXMigrationColumn (ERXMigrationTable table, String name, int jdbcType, int width, int precision, int scale, boolean allowsNull, String overrideValueType, Object defaultValue) | |
Private Attributes | |
| boolean | _allowsNull |
| Object | _defaultValue |
| ERXMigrationColumn | _foreignKeyDestination |
| int | _jdbcType |
| String | _name |
| boolean | _new |
| String | _overrideExternalType |
| String | _overrideValueType |
| int | _precision |
| boolean | _primaryKey |
| int | _scale |
| ERXMigrationTable | _table |
| int | _width |
| ERXMigrationColumn | ( | ERXMigrationTable | table, | |
| String | name, | |||
| int | jdbcType, | |||
| int | width, | |||
| int | precision, | |||
| int | scale, | |||
| boolean | allowsNull, | |||
| String | overrideValueType, | |||
| Object | defaultValue | |||
| ) | [protected] |
Constructs a new ERXMigrationColumn.
| table | the parent table | |
| name | the name of the column to create | |
| jdbcType | the JDBC type of the column (see java.sql.Types) | |
| width | the width of the column (or 0 for unspecified) | |
| precision | the precision of the column (or 0 for unspecified) | |
| scale | the scale of the column (or 0 for unspecified) | |
| allowsNull | if true, the column will allow null values | |
| defaultValue | this will set the "Default" hint in the EOAttribute's userInfo dictionary (your plugin must support this) |
| NSArray<EOSQLExpression> _createExpressions | ( | ) |
Returns an array of EOSQLExpressions for creating this column.
| NSArray<EOSQLExpression> _deleteExpressions | ( | ) |
Returns an array of EOSQLExpressions for deleting this column.
| EOAttribute _newAttribute | ( | EOEntity | entity | ) |
Returns an EOAttribute with all of its fields filled in based on the properties of this ERXMigrationColumn. The attribute is attached to the given entity.
| entity | the entity to add the attribute to |
| EOAttribute _newAttribute | ( | ) |
Returns an EOAttribute with all of its fields filled in based on the properties of this ERXMigrationColumn. The attribute is attached to a table._blankEntity().
| NSArray<EOSQLExpression> _renameToExpressions | ( | String | newName | ) |
Returns an array of EOSQLExpressions for renaming this column.
| newName | the new name of this column |
| void _setAllowsNull | ( | boolean | allowsNull | ) |
Sets whether or not this column allows nulls. This does not perform a column change operation.
| allowsNull | if true, this column allows nulls |
| void _setForeignKeyDestination | ( | ERXMigrationColumn | foreignKeyDestination | ) |
Sets the destination column for this foreign key.
| foreignKeyDestination | the destination column for this foreign key |
| void _setName | ( | String | name | ) |
Sets the name of this column. This does not perform a column rename operation.
| name | the name of this column |
| void _setNew | ( | boolean | isNew | ) |
Sets whether or not this column has been created in the database.
| isNew | if true, the column has been created |
| void _setOverrideExternalType | ( | String | overrideExternalType | ) |
Overrides the external type of this column.
| overrideExternalType | the external type to override |
| void _setOverrideValueType | ( | String | overrideValueType | ) |
Sets the value type for the underlying attribute for this column.
| overrideValueType | the value type for the underlying attribute for this column |
| void _setPrecision | ( | int | precision | ) |
Sets the precision of this column. This does not perform a column change operation.
| precision | the precision of this column |
| void _setPrimaryKey | ( | boolean | primaryKey | ) |
Sets whether or not this column is a primary key.
| primaryKey | whether or not this column is a primary key |
| void _setScale | ( | int | scale | ) |
Sets the scale of this column. This does not perform a column change operation.
| scale | the scale of this column |
| void _setWidth | ( | int | width | ) |
Sets the width of this column. This does not perform a column resize operation.
| width | the width of this column |
| boolean allowsNull | ( | ) |
Returns the width of this column.
| void create | ( | ) | throws SQLException |
Executes the SQL operations to create this column.
| SQLException | if the creation fails |
| Object defaultValue | ( | ) |
Returns the default value of this column.
| void delete | ( | ) | throws SQLException |
Executes the SQL operations to delete this column.
| SQLException | if the delete fails |
| ERXMigrationColumn foreignKeyDestination | ( | ) |
Returns the destination column for this foreign key (note this is only valid if you told migrations the foreign key).
| boolean isNew | ( | ) |
Returns true if this column has not yet been created in the database.
| boolean isPrimaryKey | ( | ) |
Returns whether or not this column is a primary key (note this is only valid if you told migrations that this column is a primary key).
| String name | ( | ) |
Returns the name of this column.
| String overrideExternalType | ( | ) |
Returns the external type of this column (or null if there is no override).
| String overrideValueType | ( | ) |
Returns the value type associated with the underlying attribute (or null to have this autoselected).
| int precision | ( | ) |
Returns the precision of this column.
| void renameTo | ( | String | newName | ) | throws SQLException |
Executes the SQL operations to rename this column.
| newName | the new name of this column |
| SQLException | if the rename fails |
| int scale | ( | ) |
Returns the scale of this column.
| void setAllowsNull | ( | boolean | allowsNull | ) | throws SQLException |
Changes the "allows null" state of this column.
| allowsNull | if true, this column allows nulls |
| SQLException | if the change fails |
| void setDataType | ( | int | jdbcType, | |
| int | scale, | |||
| int | precision, | |||
| int | width, | |||
| NSDictionary | options | |||
| ) | throws SQLException |
Changes the data type of this column.
| jdbcType | the new JDBC type of the column (see java.sql.Types) | |
| scale | the new scale | |
| precision | the new precision | |
| width | the new width | |
| options | the options to use for conversion (or null) |
| SQLException | if the change fails |
| void setDefaultValue | ( | Object | defaultValue | ) |
Sets the default value of this column.
| defaultValue | the default value of this column |
| void setNumericType | ( | int | jdbcType, | |
| int | scale, | |||
| int | precision, | |||
| NSDictionary | options | |||
| ) | throws SQLException |
Changes the data type of this column to a new numeric type.
| jdbcType | the new JDBC type of the column (see java.sql.Types) | |
| scale | the new scale | |
| precision | the new precision | |
| options | the options to use for conversion (or null) |
| SQLException | if the change fails |
| void setWidthType | ( | int | jdbcType, | |
| int | width, | |||
| NSDictionary | options | |||
| ) | throws SQLException |
Changes the data type of this column to a type that has a width.
| jdbcType | the new JDBC type of the column (see java.sql.Types) | |
| width | the new width | |
| options | the options to use for conversion (or null) |
| SQLException | if the change fails |
| ERXMigrationTable table | ( | ) |
Returns the parent ERXMigrationTable of this column.
| int width | ( | ) |
Returns the width of this column.
boolean _allowsNull [private] |
Object _defaultValue [private] |
ERXMigrationColumn _foreignKeyDestination [private] |
int _jdbcType [private] |
boolean _new [private] |
String _overrideExternalType [private] |
String _overrideValueType [private] |
int _precision [private] |
boolean _primaryKey [private] |
int _scale [private] |
ERXMigrationTable _table [private] |
int _width [private] |
final boolean AllowsNull = true [static] |
Constant for use with ERXMigrationTable.newXxxColumn AllowsNull columns.
final boolean NotNull = false [static] |
Constant for use with ERXMigrationTable.newXxxColumn NotNull columns.
final String NULL_VALUE_TYPE = "___NULL_VALUE_TYPE___" [static] |
1.5.8