Class SqlTransformBase
- Assembly
- TimeCockpit.Data.dll
transformation base for sql templates.
public abstract class SqlTransformBase
- Inheritance
-
ObjectSqlTransformBase
- Derived
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
SqlTransformBase(StringBuilder, SqlDialect)
Initializes a new instance of the SqlTransformBase class.
public SqlTransformBase(StringBuilder generationEnvironment, SqlDialect dialect)
Parameters
generationEnvironmentStringBuilderthe generation environment.
dialectSqlDialectthe dialect to use.
SqlTransformBase(SqlDialect)
Initializes a new instance of the SqlTransformBase class.
public SqlTransformBase(SqlDialect dialect)
Parameters
dialectSqlDialectthe dialect that this transform happens for.
Properties
Dialect
Gets the sql dialect to use.
public SqlDialect Dialect { get; }
Property Value
GenerationEnvironment
Gets or sets the Generation environment.
public StringBuilder GenerationEnvironment { get; set; }
Property Value
- StringBuilder
PrimaryCulture
Gets the primary culture for a query.
public Culture PrimaryCulture { get; }
Property Value
- Culture
The primary culture.
ToStringHelper
Gets or sets the ToStringHelper.
public SqlToStringHelper ToStringHelper { get; set; }
Property Value
Methods
ColumnName(StorageColumn)
Writes the column name of the storage column.
public void ColumnName(StorageColumn property)
Parameters
propertyStorageColumnThe storage column of the property.
ColumnNameWithCulture(StorageColumn, Culture)
Writes the column name of the storage column with a postfix of a culture.
public void ColumnNameWithCulture(StorageColumn property, Culture culture)
Parameters
propertyStorageColumnThe storage column of the property.
cultureCultureThe culture to get the postfix from.
DatabaseName(ModelElement)
Writes the Database name of the element.
public void DatabaseName(ModelElement element)
Parameters
elementModelElementThe element to print the name of.
DataType(StorageColumn)
inserts a data type.
public void DataType(StorageColumn column)
Parameters
columnStorageColumnthe colume whose datatype to insert.
GO()
inserts the contents of the go template
public void GO()
RelationName(RelationBase)
Writes the Relation name of the element.
public void RelationName(RelationBase relation)
Parameters
relationRelationBaseThe relation to print the name of.
SchemaTemplate(String)
Writes the schema name followed by a dot to the template result. If schema is null or empty, nothing is written (sql ce)
public void SchemaTemplate(string name)
Parameters
nameStringthe schema name, or null if nothing should be printed.
SchemaTemplateWithEquals(String)
Writes the schema name followed by a dot to the template result. If schema is null or empty, nothing is written (sql ce)
public void SchemaTemplateWithEquals(string name)
Parameters
nameStringthe schema name, or null if nothing should be printed.
TableName(ModelElement)
Writes the TableName.
public void TableName(ModelElement element)
Parameters
elementModelElementthe model element to write the tablename for.
TransformText()
abstract implementation for transforming the text.
public abstract string TransformText()
Returns
- String
returns the generated string.
Write(String)
Writes the string to the environment.
public void Write(string str)
Parameters
strStringthe string to write.
WriteLine()
Writes a newline to the environment
public void WriteLine()