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()); }
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()); }
public abstract string GetSql(TableItem tabItem);