本文整理汇总了C#中SqlWriter.WriteLine方法的典型用法代码示例。如果您正苦于以下问题:C# SqlWriter.WriteLine方法的具体用法?C# SqlWriter.WriteLine怎么用?C# SqlWriter.WriteLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlWriter
的用法示例。
在下文中一共展示了SqlWriter.WriteLine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteTo
public override void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
writer.WriteKeyword("EXISTS ");
using (writer.Indent()) {
writer.WriteLine("(");
writer.WriteScript(selectQuery, WhitespacePadding.None);
}
writer.WriteLine();
writer.Write(')');
}
示例2: WriteTo
public override void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
writer.WriteKeyword("BEGIN");
writer.WriteLine();
using (writer.Indent()) {
writer.WriteScriptSequence(statements, WhitespacePadding.None, w => w.WriteLine(";"));
writer.WriteLine(";");
}
writer.WriteKeyword("END");
}
示例3: WriteTo
public override void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
writer.WriteKeyword("BEGIN TRY");
using (writer.Indent()) {
writer.WriteScriptSequence(tryStatements, WhitespacePadding.NewlineBefore, w => w.Write(';'));
writer.WriteLine(";");
}
writer.WriteKeyword("END TRY");
writer.WriteLine();
writer.WriteKeyword("BEGIN CATCH");
using (writer.Indent()) {
writer.WriteScriptSequence(catchStatements, WhitespacePadding.NewlineBefore, w => w.Write(';'));
writer.WriteLine(";");
}
writer.WriteKeyword("END CATCH");
}
示例4: WriteTo
public override void WriteTo(SqlWriter writer) {
using (writer.Indent()) {
writer.Write('(');
writer.WriteKeyword("VALUES");
string separator = "";
foreach (IEnumerable<Expression> expressions in valuesList) {
writer.WriteLine(separator);
separator = ",";
writer.Write("(");
writer.WriteScriptSequence(expressions, WhitespacePadding.None, w => w.Write(", "));
writer.Write(")");
}
}
writer.WriteLine();
writer.Write(')');
base.WriteTo(writer);
}
示例5: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.Write('(');
using (writer.Indent()) {
writer.WriteScript(inner, WhitespacePadding.NewlineBefore);
writer.WriteScriptSequence(joins, WhitespacePadding.NewlineBefore, null);
}
writer.WriteLine();
writer.Write(')');
}
示例6: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.Write('(');
using (writer.Indent()) {
writer.WriteScript(select, WhitespacePadding.NewlineBefore);
}
writer.WriteLine();
writer.Write(')');
base.WriteTo(writer);
}
示例7: WriteTo
public override void WriteTo(SqlWriter writer) {
if (HasValue) {
writer.WriteKeyword("USING XML INDEX ");
writer.WriteScript(indexName, WhitespacePadding.None);
writer.WriteLine();
writer.WriteKeyword("FOR ");
writer.Write(IndexForSpecifier);
}
}
示例8: WriteTo
public override void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
writer.Write('(');
using (writer.Indent()) {
writer.WriteScript(value, WhitespacePadding.NewlineBefore);
}
writer.WriteLine();
writer.Write(')');
}
示例9: WriteTo
public override void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
if (HasValue) {
writer.WriteKeyword("WITH ");
if (namespaces.Count > 0) {
using (writer.Indent()) {
writer.WriteKeyword("XMLNAMESPACES ");
writer.Write('(');
writer.WriteScriptSequence(namespaces, WhitespacePadding.NewlineBefore, w => w.Write(','));
}
writer.WriteLine();
writer.Write(')');
if (commonTableExpressions.Count > 0) {
writer.WriteLine(",");
}
}
writer.WriteScriptSequence(commonTableExpressions, WhitespacePadding.None, w => w.WriteLine(","));
}
}
示例10: WriteToInternal
protected override void WriteToInternal(SqlWriter writer) {
base.WriteToInternal(writer);
writer.WriteLine();
writer.WriteKeyword("VALUES");
using (writer.Indent()) {
string separator = "";
foreach (IEnumerable<Expression> expressions in valuesList) {
if (valuesList.Count > 1) {
writer.WriteLine(separator);
} else {
writer.Write(' ');
}
separator = ",";
writer.Write("(");
writer.WriteScriptSequence(expressions, WhitespacePadding.None, w => w.Write(", "));
writer.Write(")");
}
}
}
示例11: WriteTo
public override void WriteTo(SqlWriter writer) {
base.WriteTo(writer);
writer.WriteKeyword("AS TABLE ");
writer.Write('(');
using (writer.Indent()) {
writer.WriteScriptSequence(tableDefinitions, WhitespacePadding.NewlineBefore, w => w.Write(","));
}
writer.WriteLine();
writer.Write(')');
}
示例12: WriteTo
public override sealed void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
writer.WriteKeyword("WHEN ");
using (writer.Indent()) {
WriteMatchedTo(writer);
writer.WriteKeyword(" THEN");
writer.WriteLine();
writer.WriteScript(operation, WhitespacePadding.None);
}
}
示例13: WriteTo
public override void WriteTo(SqlWriter writer) {
WriteCommentsTo(writer);
writer.WriteKeyword("DECLARE ");
writer.WriteScript(variableName, WhitespacePadding.None);
writer.WriteKeyword(" TABLE ");
writer.Write('(');
using (writer.Indent()) {
writer.WriteScriptSequence(tableDefinitions, WhitespacePadding.NewlineBefore, w => w.Write(','));
}
writer.WriteLine();
writer.Write(')');
}
示例14: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteKeyword("FETCH ");
writer.WriteScript(cursorPosition, WhitespacePadding.SpaceAfter);
writer.WriteScript(cursorName, WhitespacePadding.None);
if (destinationVariables.Count > 0) {
using (writer.Indent()) {
writer.WriteLine();
writer.WriteKeyword("INTO ");
writer.WriteScriptSequence(destinationVariables, WhitespacePadding.None, w => w.Write(", "));
}
}
}
示例15: WriteTo
public override void WriteTo(SqlWriter writer) {
base.WriteTo(writer);
writer.WriteKeyword(UniqueKindName);
writer.Write(' ');
writer.WriteEnum(clustered, WhitespacePadding.SpaceAfter);
writer.Write('(');
using (writer.Indent()) {
writer.WriteScriptSequence(indexColumns, WhitespacePadding.NewlineBefore, w => w.Write(", "));
}
writer.WriteLine();
writer.Write(')');
writer.WriteScript(indexOptionGroup, WhitespacePadding.SpaceBefore);
}