Table of Contents

Class SqlTransformBase

Namespace
TimeCockpit.Data.Database.StringTemplates
Assembly
TimeCockpit.Data.dll

transformation base for sql templates.

public abstract class SqlTransformBase
Inheritance
Object
SqlTransformBase
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

generationEnvironment StringBuilder

the generation environment.

dialect SqlDialect

the dialect to use.

SqlTransformBase(SqlDialect)

Initializes a new instance of the SqlTransformBase class.

public SqlTransformBase(SqlDialect dialect)

Parameters

dialect SqlDialect

the dialect that this transform happens for.

Properties

Dialect

Gets the sql dialect to use.

public SqlDialect Dialect { get; }

Property Value

SqlDialect

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

SqlToStringHelper

Methods

ColumnName(StorageColumn)

Writes the column name of the storage column.

public void ColumnName(StorageColumn property)

Parameters

property StorageColumn

The 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

property StorageColumn

The storage column of the property.

culture Culture

The culture to get the postfix from.

DatabaseName(ModelElement)

Writes the Database name of the element.

public void DatabaseName(ModelElement element)

Parameters

element ModelElement

The element to print the name of.

DataType(StorageColumn)

inserts a data type.

public void DataType(StorageColumn column)

Parameters

column StorageColumn

the 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

relation RelationBase

The 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

name String

the 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

name String

the schema name, or null if nothing should be printed.

TableName(ModelElement)

Writes the TableName.

public void TableName(ModelElement element)

Parameters

element ModelElement

the 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

str String

the string to write.

WriteLine()

Writes a newline to the environment

public void WriteLine()