MySQLGateway

MySQLGateway

MySQLGateway

Metadata

addColumn()

Runs an ALTER sql command for the property. Not for use with array properties.

Arguments

Name Type Required Default Options Description
schema struct Yes The type schema
propertyname string Yes The property to add
logLocation string No

deploySchema()

Deploys the table structure for a FarCry type into a MySQL database.

Arguments

Name Type Required Default Options Description
schema struct Yes
bDropTable boolean No false
logLocation string No

dropColumn()

Runs an ALTER sql command for the property. Not for use with array properties.

Arguments

Name Type Required Default Options Description
schema struct Yes The type schema
propertyname string Yes The property to remove
logLocation string No

getColumns()

Returns the results of cfdbinfo, or an equivalent query (column_name,is_nullable,column_default_value,type_name,char_octet_length,column_size,decimal_digits)

Arguments

Name Type Required Default Options Description
tablename string Yes

getIndexes()

Returns the results of cfdbinfo, or an equivalent query (index_name,column_name[,ordinal_position])

Arguments

Name Type Required Default Options Description
tablename string Yes

getValueForDB()

Returns cfsqltype, null, and value for specified metadata and value

Arguments

Name Type Required Default Options Description
schema struct Yes
value any Yes

introspectIndexes()

Constructs metadata struct for table indexes

Arguments

Name Type Required Default Options Description
tablename string Yes The table to introspect

introspectTable()

Constructs a metadata struct for the table

Arguments

Name Type Required Default Options Description
tablename string Yes The table to introspect

introspectType()

Constructs a metadata struct for a type and it's array properties

Arguments

Name Type Required Default Options Description
typename string Yes The type to introspect

isFieldAltered()

Returns true if there is a difference

Arguments

Name Type Required Default Options Description
expected struct Yes The expected schema
actual struct Yes The actual schema

repairColumn()

Runs an ALTER sql command for the property. Not for use with array properties.

Arguments

Name Type Required Default Options Description
schema struct Yes The type schema
propertyname string Yes The property to repair
oldpropertyname string No [runtime expression] The property to rename
logLocation string No