当前位置: 首页>>代码示例>>C#>>正文


C# SqlWriter.WriteScriptSequence方法代码示例

本文整理汇总了C#中SqlWriter.WriteScriptSequence方法的典型用法代码示例。如果您正苦于以下问题:C# SqlWriter.WriteScriptSequence方法的具体用法?C# SqlWriter.WriteScriptSequence怎么用?C# SqlWriter.WriteScriptSequence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SqlWriter的用法示例。


在下文中一共展示了SqlWriter.WriteScriptSequence方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteTo

		public override void WriteTo(SqlWriter writer) {
			if (partitions.Count > 0) {
				writer.WriteKeyword("PARTITION BY ");
				writer.WriteScriptSequence(partitions, WhitespacePadding.None, w => w.Write(", "));
				if (orders.Count > 0) {
					writer.Write(' ');
				}
			}
			if (orders.Count > 0) {
				writer.WriteKeyword("ORDER BY ");
				writer.WriteScriptSequence(orders, WhitespacePadding.None, w => w.Write(", "));
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:13,代码来源:RankingArguments.cs

示例2: WriteTo

		public override void WriteTo(SqlWriter writer) {
			WriteCommentsTo(writer);
			writer.WriteKeyword("RAISERROR");
			writer.Write('(');
			using (writer.Indent()) {
				writer.WriteScriptSequence(arguments, WhitespacePadding.None, w => w.Write(", "));
			}
			writer.Write(')');
			if (options.Count > 0) {
				writer.WriteKeyword(" WITH ");
				writer.WriteScriptSequence(options, WhitespacePadding.None, w => w.Write(", "));
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:13,代码来源:RaiserrorStatement.cs

示例3: WriteTo

		public override void WriteTo(SqlWriter writer) {
			writer.WriteKeyword("FOR UPDATE");
			if (columns.Count > 0) {
				writer.WriteKeyword(" OF ");
				writer.WriteScriptSequence(columns, WhitespacePadding.None, w => w.Write(", "));
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:7,代码来源:UpdateModeForUpdate.cs

示例4: WriteTo

		public override void WriteTo(SqlWriter writer) {
			base.WriteTo(writer);
			writer.WriteKeyword("REFERENCES ");
			writer.WriteScript(tableName, WhitespacePadding.None);
			writer.WriteScript(refColumnName, WhitespacePadding.SpaceBefore);
			writer.WriteScriptSequence(keyActions, WhitespacePadding.SpaceBefore, null);
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:7,代码来源:ColumnForeignKeyConstraint.cs

示例5: 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");
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:16,代码来源:TryCatchStatement.cs

示例6: WriteTo

		public override void WriteTo(SqlWriter writer) {
			WriteCommentsTo(writer);
			writer.WriteKeyword("OPTION ");
			writer.Write('(');
			writer.WriteScriptSequence(options, WhitespacePadding.None, w => w.Write(", "));
			writer.Write(')');
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:7,代码来源:QueryHint.cs

示例7: WriteToInternal

		protected virtual void WriteToInternal(SqlWriter writer) {
			writer.WriteScript(function, WhitespacePadding.None);
			if (functions.Count > 0) {
				writer.Write('.');
				writer.WriteScriptSequence(functions, WhitespacePadding.None, w => w.Write('.'));
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:7,代码来源:ExpressionFunctionCalls.cs

示例8: AnyStatement

		public AnyStatement(Identifier identifier, Sequence<Expression> expressions) {
			using (StringWriter stringWriter = new StringWriter()) {
				SqlWriter statementWriter = new SqlWriter(stringWriter, DatabaseEngine.Unknown);
				statementWriter.WriteIdentifier(identifier.Value);
				statementWriter.WriteScriptSequence(expressions, WhitespacePadding.SpaceBefore, null);
				statementText = stringWriter.ToString();
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:8,代码来源:AnyStatement.cs

示例9: WriteTo

		public override void WriteTo(SqlWriter writer) {
			WriteCommentsTo(writer);
			writer.WriteKeyword("INSERT ");
			if (columnNames.Count > 0) {
				writer.Write('(');
				writer.WriteScriptSequence(columnNames, WhitespacePadding.None, w => w.Write(", "));
				writer.Write(") ");
			}
			if (expressions.Count > 0) {
				writer.WriteKeyword("VALUES ");
				writer.Write('(');
				writer.WriteScriptSequence(expressions, WhitespacePadding.None, w => w.Write(", "));
				writer.Write(')');
			} else {
				writer.WriteKeyword("DEFAULT VALUES");
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:17,代码来源:MergeOperationInsert.cs

示例10: WriteToInternal

		protected override void WriteToInternal(SqlWriter writer) {
			if (columnNames.Count > 0) {
				writer.Write(" (");
				writer.WriteScriptSequence(columnNames, WhitespacePadding.None, w => w.Write(", "));
				writer.Write(")");
			}
			writer.WriteScript(output, WhitespacePadding.NewlineBefore);
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:8,代码来源:InsertValuesStatement.cs

示例11: WriteTo

		public override void WriteTo(SqlWriter writer) {
			if (HasValue) {
				writer.WriteKeyword("WITH ");
				writer.Write('(');
				writer.WriteScriptSequence(hints, WhitespacePadding.None, w => w.Write(", "));
				writer.Write(')');
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:8,代码来源:TableHintGroup.cs

示例12: 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(')');
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:9,代码来源:SourceParens.cs

示例13: WriteTo

		public override void WriteTo(SqlWriter writer) {
			if (HasValue) {
				writer.WriteKeyword("OUTPUT ");
				using (writer.Indent()) {
					writer.WriteScriptSequence(columnItems, WhitespacePadding.None, w => w.Write(", "));
					if (destinationName != null) {
						writer.WriteLine();
						writer.WriteKeyword("INTO ");
						writer.WriteScript(destinationName, WhitespacePadding.None);
						if (destinationColumnNames.Count > 0) {
							writer.Write(" (");
							writer.WriteScriptSequence(destinationColumnNames, WhitespacePadding.None, w => w.Write(", "));
							writer.Write(')');
						}
					}
				}
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:18,代码来源:OutputClause.cs

示例14: 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");
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:10,代码来源:StatementBlock.cs

示例15: 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(","));
			}
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:19,代码来源:QueryOptions.cs


注:本文中的SqlWriter.WriteScriptSequence方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。