public static string Select(this ISqlDialect d, IDataDescriptor descriptor, string table, string schema, List <string> columns, List <string> keys, List <string> parameters) { return(StringBuilderPool.Scoped(sb => { if (descriptor != null && !d.BeforeSelect(descriptor, sb)) { return; } sb.Append("SELECT "); if (!d.BeforeSelectColumns(descriptor, sb, columns)) { return; } for (var i = 0; i < columns.Count; i++) { sb.AppendName(d, columns[i]); if (i < columns.Count - 1) { sb.Append(", "); } } sb.Append(" FROM ").AppendTable(d, table, schema); sb.AppendWhereClause(descriptor, d, keys, parameters); })); }