コード例 #1
0
 public SqlDefinitionBuilder(ITemplateOptions options = null)
 {
     this.root      = new CompositeSqlDefinitionElement(this);
     this.Text      = new SqlTextAppender(this, root);
     this.Parameter = new SqlParameterAppender(this, root);
     this.Options   = options;
 }
コード例 #2
0
 public void EndBlock()
 {
     if (blockElement != null && blockElement.HasBlock)
     {
         blockElement.EndBlock();
         return;
     }
     blockElement = null;
 }
コード例 #3
0
 public void StartBlock(string name)
 {
     if (blockElement != null)
     {
         blockElement.StartBlock(name);
         return;
     }
     blockElement = new CompositeSqlDefinitionElement(this.builder, this, name);
     this.elements.Add(blockElement);
 }
コード例 #4
0
 public SqlTextAppender(SqlDefinitionBuilder builder, CompositeSqlDefinitionElement elements)
 {
     this.builder  = builder;
     this.elements = elements;
 }
コード例 #5
0
 public CompositeSqlDefinitionElement(ISqlDefinitionBuilder builder, CompositeSqlDefinitionElement parent, string name)
 {
     this.builder = builder;
     this.Name    = name;
     this.parent  = parent;
 }