Class SchemaTemplates
- Assembly
- TimeCockpit.Data.dll
Class to produce the template output
public class SchemaTemplates : SqlTransformBase
- Inheritance
-
ObjectSchemaTemplates
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
SchemaTemplates(StringBuilder, SqlDialect)
Initializes a new instance of the SchemaTemplates class.
public SchemaTemplates(StringBuilder generationEnvironment, SqlDialect dialect)
Parameters
generationEnvironmentStringBuilderthe target generation environment.
dialectSqlDialectthe dialect for the template.
SchemaTemplates(SqlDialect)
Initializes a new instance of the SchemaTemplates class.
public SchemaTemplates(SqlDialect dialect)
Parameters
dialectSqlDialectthe dialect to ue for the template.
Methods
AddBlobColumnToGarbageCollection(String, ModelEntityBase, BinaryProperty)
creates an sql command to add a blob column to the garbage collection.
public void AddBlobColumnToGarbageCollection(string schema, ModelEntityBase entity, BinaryProperty blobProperty)
Parameters
schemaStringthe schema to use.
entityModelEntityBasethe model entity.
blobPropertyBinaryPropertythe blob property.
CreateConstraints(ModelEntityBase, Relation[], String)
creates an sql command to create constraints.
public void CreateConstraints(ModelEntityBase entity, Relation[] relations, string schema)
Parameters
entityModelEntityBasethe entity.
relationsRelation[]the relations to create constraints for.
schemaStringthe schema to use.
CreateCulture(String, TextProperty[], KeyValuePair<TextProperty, Boolean>[], Culture)
creates an sql command to create a culture.
public void CreateCulture(string schema, TextProperty[] localizedProperties, KeyValuePair<TextProperty, bool>[] firstTimers, Culture culture)
Parameters
schemaStringthe schema to use.
localizedPropertiesTextProperty[]all localized textproperties in the model.
firstTimersKeyValuePair<TextProperty, Boolean>[]the localized properties that get their first culture.
cultureCulturethe culture to add.
CreateEntity(String, ModelEntityBase)
creates an SQL command to create an entity.
public void CreateEntity(string schema, ModelEntityBase entity)
Parameters
schemaStringthe schema to use.
entityModelEntityBasethe entity to use.
CreateEntityView(String)
creates an sql command to create an entity view.
public void CreateEntityView(string schema)
Parameters
schemaStringthe schema to use.
CreateModelAction(String)
creates an sql command to create a model action..
public void CreateModelAction(string schema)
Parameters
schemaStringthe schema to use.
CreateModelEntityInterface(String, ModelEntityInterface)
creates an SQL command to create a model entity interface.
public void CreateModelEntityInterface(string schema, ModelEntityInterface entityInterface)
Parameters
schemaStringthe schema to use.
entityInterfaceModelEntityInterfacethe entity interface.
CreateNamedSetDefinition(String)
creates an sql command to create a named set definition.
public void CreateNamedSetDefinition(string schema)
Parameters
schemaStringthe schema to use.
CreatePermission(String)
creates an sql command to drop an entity view.
public void CreatePermission(string schema)
Parameters
schemaStringthe schema to use.
CreateProperty(String, ModelProperty, StorageColumn[], Object, Culture[])
creates an SQL command to create a property.
public void CreateProperty(string schema, ModelProperty property, StorageColumn[] columns, object lengthPrecision, Culture[] cultures)
Parameters
schemaStringthe schema to use.
propertyModelPropertythe property to create.
columnsStorageColumn[]the storage columns.
lengthPrecisionObjectthe optional length precision.
culturesCulture[]the available cultures in the model.
CreateRelation(String, RelationBase, Boolean)
creates an SQL command to create a relation.
public void CreateRelation(string schema, RelationBase relation, bool hasLogicalRelations)
Parameters
schemaStringthe schema to use.
relationRelationBasethe relation to create.
hasLogicalRelationsBooleantrue if the installed schema has logical relations installed, false otherwise
CreateTrigger(String)
creates an sql command to create a trigger.
public void CreateTrigger(string schema)
Parameters
schemaStringthe schema to use.
CreateValidationRule(String)
creates an SQL command to create a validation rule.
public void CreateValidationRule(string schema)
Parameters
schemaStringthe schema to use.
DisableCyclicConstraints(ModelEntityBase, String)
creates an sql command to disable constraints.
public void DisableCyclicConstraints(ModelEntityBase entity, string schema)
Parameters
entityModelEntityBasethe entity.
schemaStringthe schema to use.
DropConstraints(ModelEntityBase, String)
creates an sql command to drop constraints.
public void DropConstraints(ModelEntityBase entity, string schema)
Parameters
entityModelEntityBasethe entity.
schemaStringthe schema to use.
DropCulture(String, TextProperty[], Culture)
creates an sql command to drop a culture.
public void DropCulture(string schema, TextProperty[] localizedProperties, Culture culture)
Parameters
schemaStringthe schema to use.
localizedPropertiesTextProperty[]all localized textproperties in the model.
cultureCulturethe culture to remove.
DropDefaultConstraint(String, ModelElement, StorageColumn)
creates an sql command to drop default constraint.
public void DropDefaultConstraint(string schema, ModelElement element, StorageColumn column)
Parameters
schemaStringthe schema to use.
elementModelElementthe model element.
columnStorageColumnthe storage column of concern.
DropEntity(String, ModelEntityBase)
creates an SQL command to drop an entity.
public void DropEntity(string schema, ModelEntityBase entity)
Parameters
schemaStringthe schema to use.
entityModelEntityBasemodel entity base.
DropEntityView(String)
creates an sql command to drop an entity view.
public void DropEntityView(string schema)
Parameters
schemaStringthe schema to use.
DropModelAction(String)
creates an sql command to drop a model action.
public void DropModelAction(string schema)
Parameters
schemaStringthe schema to use.
DropModelEntityInterface(String, DeleteOperation)
creates an sql command to drop an model entity interface.
public void DropModelEntityInterface(string schema, DeleteOperation entity)
Parameters
schemaStringthe schema to use.
entityDeleteOperationthe delete operation.
DropNamedSetDefinition(String)
creates an sql command to drop a named set definition.
public void DropNamedSetDefinition(string schema)
Parameters
schemaStringthe schema to use.
DropPermission(String)
creates an sql command to drop a permission.
public void DropPermission(string schema)
Parameters
schemaStringthe schema to use.
DropProperty(String, DeleteOperation, StorageColumn[], ModelProperty, Culture[])
creates an SQL command to drop a property.
public void DropProperty(string schema, DeleteOperation deleteOperation, StorageColumn[] columns, ModelProperty property, Culture[] cultures)
Parameters
schemaStringthe schema to use.
deleteOperationDeleteOperationthe delete operation.
columnsStorageColumn[]the storage columns.
propertyModelPropertythe property to create.
culturesCulture[]the available cultures in the model.
DropRelation(String, DeleteOperation)
creates an SQL command to drop a relation.
public void DropRelation(string schema, DeleteOperation deleteOperation)
Parameters
schemaStringthe schema to use.
deleteOperationDeleteOperationthe delete operation.
DropTrigger(String)
creates an sql command to drop a trigger.
public void DropTrigger(string schema)
Parameters
schemaStringthe schema to use.
DropValidationRule(String)
creates an SQL command to drop a validation rule.
public void DropValidationRule(string schema)
Parameters
schemaStringthe schema to use.
EnableCyclicConstraints(ModelEntityBase, String)
creates an sql command to enable cyclic constraints.
public void EnableCyclicConstraints(ModelEntityBase entity, string schema)
Parameters
entityModelEntityBasethe entity.
schemaStringthe schema to use.
GetExistingLocalizedColumnsByProperty(String, ModelProperty)
Gets a list of localized columns for a given property.
public void GetExistingLocalizedColumnsByProperty(string schema, ModelProperty property)
Parameters
schemaStringthe schema to use.
propertyModelPropertyA property to check existing translations for.
GetLocalModelVersion(String)
creates an sql command to get the local model version.
public void GetLocalModelVersion(string schema)
Parameters
schemaStringthe schema to use.
HasColumnBeenLocalized(String, ModelProperty)
Gets a list of localized columns for a given property.
public void HasColumnBeenLocalized(string schema, ModelProperty property)
Parameters
schemaStringthe schema to use.
propertyModelPropertyA property to check existing translations for.
InsertIntoDead(String)
creates an sql command to insert something into a dead.
public void InsertIntoDead(string schema)
Parameters
schemaStringthe schema to use.
TransformText()
Create the template output
public override string TransformText()
Returns
- String
UpdateCulture(String)
creates an sql command to update a cultre.
public void UpdateCulture(string schema)
Parameters
schemaStringthe schema to use.
UpdateEntity(String, ModelEntityBase)
creates an SQL command to update an entity.
public void UpdateEntity(string schema, ModelEntityBase entity)
Parameters
schemaStringthe schema to use.
entityModelEntityBasemodel entity base.
UpdateEntityView(String)
creates an sql command to update an entity view.
public void UpdateEntityView(string schema)
Parameters
schemaStringthe schema to use.
UpdateModelAction(String, Boolean, Boolean)
creates an sql command to update a model action.
public void UpdateModelAction(string schema, bool hasShowInFormsListsExpression, bool hasExecuteWithoutPrompt)
Parameters
schemaStringthe schema to use.
hasShowInFormsListsExpressionBooleanhasExecuteWithoutPromptBoolean
UpdateNamedSetDefinition(String)
creates an sql command to update a named set definition.
public void UpdateNamedSetDefinition(string schema)
Parameters
schemaStringthe schema to use.
UpdatePermission(String)
creates an sql command to update a permission.
public void UpdatePermission(string schema)
Parameters
schemaStringthe schema to use.
UpdateProperty(String, ModelProperty, StorageColumn[], Object, Culture[], Culture[], Culture)
creates an SQL command to update a property.
public void UpdateProperty(string schema, ModelProperty property, StorageColumn[] columns, object lengthPrecision, Culture[] cultures, Culture[] existingCultures, Culture defaultCulture)
Parameters
schemaStringthe schema to use.
propertyModelPropertythe property to create.
columnsStorageColumn[]the storage columns.
lengthPrecisionObjectthe optional length precision.
culturesCulture[]the cultures missing for the given property.
existingCulturesCulture[]the cultures that have already been created before.
defaultCultureCulturethe current default culture of the model.
UpdateRelation(String, RelationBase, Boolean)
creates an SQL command to update a relation.
public void UpdateRelation(string schema, RelationBase relation, bool hasLogicalRelations)
Parameters
schemaStringthe schema to use.
relationRelationBasethe relation to create.
hasLogicalRelationsBooleantrue if the installed schema has logical relations installed, false otherwise
UpdateTrigger(String)
creates an sql command to update a trigger.
public void UpdateTrigger(string schema)
Parameters
schemaStringthe schema to use.
UpdateValidationRule(String)
creates an SQL command to update a validation rule.
public void UpdateValidationRule(string schema)
Parameters
schemaStringthe schema to use.