示例#1
0
 public JoinClause(string table1, string key1, string table2, string key2, CompareOpration comp, JoinMode mode)
 {
     this.Table1 = table1;
     this.Table2 = table2;
     this.Key1 = key1;
     this.Key2 = key2;
     this.Comp = comp;
     this.Mode = mode;
 }
示例#2
0
 public JoinClause(Type type1, string key1, Type type2, string key2, CompareOpration comp, JoinMode mode)
 {
     this.Type1 = type1;
     this.Type2 = type2;
     this.Table1 = ModelContext.GetInstance(type1).Info.From.MainTableName;
     this.Table2 = ModelContext.GetInstance(type2).Info.From.MainTableName;
     this.Key1 = key1;
     this.Key2 = key2;
     this.Comp = comp;
     this.Mode = mode;
 }
示例#3
0
 public JoinOnAttribute(int index, string table1, string key1, string table2, string key2, CompareOpration comp, JoinMode mode)
 {
     this.Index = index;
     Joinner = new JoinClause(table1, key1, table2, key2, comp, mode);
 }
示例#4
0
 public JoinOnAttribute(int index, Type modelType1, string key1, Type modelType2, string key2, JoinMode mode)
     : this(index, modelType1, key1, modelType2, key2, CompareOpration.Equal, mode)
 {
 }
示例#5
0
 public OQL AddAssociation(string associationName, string alias, JoinMode joinMode)
 {
     Association association = new Association(associationName, alias, joinMode);
     _associations.Add(association);
     return this;
 }
示例#6
0
 private string GetJoinSql(JoinMode mode)
 {
     if (mode == JoinMode.Default) return ",";
     if (mode == JoinMode.InnerJoin) return "Inner Join";
     if (mode == JoinMode.LeftJoin) return "Left Join";
     else return "";
 }
示例#7
0
 public Association(string associationName, string alias,JoinMode joinMode)
 {
     _associationName = associationName;
     _alias = alias;
     _joinMode = joinMode;
 }