本文整理汇总了C#中SqlWriter.WriteFunction方法的典型用法代码示例。如果您正苦于以下问题:C# SqlWriter.WriteFunction方法的具体用法?C# SqlWriter.WriteFunction怎么用?C# SqlWriter.WriteFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlWriter
的用法示例。
在下文中一共展示了SqlWriter.WriteFunction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteToInternal
protected internal override void WriteToInternal(SqlWriter writer, bool isPartOfQualifiedName) {
if (IsBuiltinFunction) {
if ((writer.Engine == DatabaseEngine.SqlAzure) && (Value.Equals("NEWSEQUENTIALID", StringComparison.OrdinalIgnoreCase))) {
writer.WriteFunction(ScriptParser.GetBuiltinFunctionName("NEWID"));
} else {
writer.WriteFunction(Value);
}
} else {
base.WriteToInternal(writer, true);
}
}
示例2: WriteTo
public override void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
writer.WriteFunction("UPDATE");
writer.Write('(');
writer.WriteScript(columnName, WhitespacePadding.None);
writer.Write(')');
}
示例3: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteFunction("COUNT");
writer.Write('(');
writer.WriteDuplicateRestriction(restriction, WhitespacePadding.SpaceAfter);
writer.WriteScript(expression, WhitespacePadding.None);
writer.Write(')');
}
示例4: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteFunction("CAST");
writer.Write('(');
writer.WriteScript(expression, WhitespacePadding.None);
writer.WriteKeyword(" AS ");
writer.WriteScript(typeName, WhitespacePadding.None);
writer.Write(')');
}
示例5: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteFunction("OPENXML");
writer.Write('(');
writer.WriteScript(variableName, WhitespacePadding.None);
writer.Write(", ");
stringValue.WriteTo(writer);
if (flags != 0) {
writer.Write(", ");
writer.WriteKeyword(flags.ToString(NumberFormatInfo.InvariantInfo));
}
writer.Write(')');
writer.WriteScript(schema, WhitespacePadding.SpaceBefore);
}
示例6: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteFunction("OBJECT_ID");
writer.Write('(');
using (StringWriter nameWriter = new StringWriter(CultureInfo.InvariantCulture)) {
objectName.WriteTo(new SqlWriter(nameWriter, writer.Engine, SqlWriterMode.NoComments));
new StringLiteral(nameWriter.ToString(), unicodeObjectName, null).WriteTo(writer);
}
if (objectType != null) {
writer.Write(", ");
objectType.WriteTo(writer);
}
writer.Write(')');
}
示例7: WriteToInternal
protected internal override void WriteToInternal(SqlWriter writer, bool isPartOfQualifiedName) {
writer.WriteFunction(Value);
}