示例#1
0
        public override string GetSql(TableItem tabItem)
        {
            StringBuilder sqlBuilder = new StringBuilder();

            sqlBuilder.Append("SELECT ");
            sqlBuilder.Append(BuildGroupTarget(Fields));
            sqlBuilder.AppendFormat(" FROM {0} ", tabItem.TableName);
            sqlBuilder.AppendFormat(BuildCondition(Conditions));
            return(sqlBuilder.ToString());
        }
示例#2
0
        public override string GetSql(TableItem tabItem)
        {
            StringBuilder sqlBuilder = new StringBuilder();

            sqlBuilder.Append("SELECT ");
            sqlBuilder.Append(BuildFieldTarget(Fields));
            sqlBuilder.AppendFormat(" FROM {0} ", tabItem.TableName);
            sqlBuilder.Append(BuildCondition(Conditions));
            if (Offset > 0 || Limit > 0)
            {
                sqlBuilder.AppendFormat(" LIMIT {0},{1} ",
                                        Offset > 0 ? Offset : 0,
                                        Limit > 0 ? Limit : 1000);
            }
            return(sqlBuilder.ToString());
        }
示例#3
0
 public abstract string GetSql(TableItem tabItem);