예제 #1
0
 /// <summary>
 /// List of fields
 /// </summary>
 public static string Fields(string pTable, Fields pFields)
 {
     return pFields.Count == 0
         ? string.Format("`{0}`.*", pTable)
         : string.Join(_COMMA, from field in pFields.Values
                               select Field(pTable, field.Name));
 }
예제 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public JoinTable(iQueryBuilder pQuery, string pTable, IEnumerable<string> pFields)
        {
            Table = pTable;
            Fields = new Fields(pQuery);

            if (pFields == null)
            {
                return;
            }

            pFields.ToList().ForEach(pStr=>Fields.Add(new FieldValue(pStr)));
        }
예제 #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public QueryBuilder(eTYPE pType, Model pModel)
        {
            _where = new Conditions(this);
            _type = pType;
            _model = pModel;
            Joins = new Joinable(this);

            _parameters = new Parameters(this, pModel);
            _variables = new Parameters(this, pModel);

            _fields = new Fields(this);
            _duplicate = new Fields(this);
            _groups = new Fields(this);

            Order = new List<KeyValuePair<eDIR, string>>();
            Limit = 0;
            Offset = 0;
            Locked = false;
        }