Esempio n. 1
0
 /// <summary>
 /// 初始化创建普通表。
 /// </summary>
 /// <param name="context">生成上下文。</param>
 /// <param name="table">表元数据。</param>
 public CreateTableFragment(GenerateContext context, TableMetadata table)
     : base(context)
 {
     Metadata = table;
     Table    = new ObjectNameFragment(context, table.Name, table.Schema);
     foreach (var col in table.Members)
     {
         Members.Add(new CreateColumnFragment(context, col, this));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 创建判断对象存在。
 /// </summary>
 /// <param name="context">生成上下文。</param>
 /// <param name="name">对象名称。</param>
 /// <param name="kind">对象种类。</param>
 public ObjectExsitFragment(GenerateContext context, ObjectNameFragment name, EDatabaseObject kind)
     : base(context)
 {
     Name = name;
     Kind = kind;
 }