TopGit tracks Rem0o/SqlQueryBuilder on GitHub as part of the Backend family. The project has 14 stars. C# library to build type safe T-SQL queries around your POCO classes.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Build all your Select/Update/Insert/Delete T-SQL queries arround your POCOs!
Fluent interface
Try-Build pattern (basic validation)
Evaluate once: use parameters ("@param") within the builder to parametrize your queries!
Other features
Build your complex "WHERE" clauses as sub-blocks you can assemble
Use complex selectors like aggregates and SQL functions by inheriting the SelectBuilder class.
Supports table name alias (when you join the same table multiple times)
All depedencies are abstracted and injected, can easily be integrated with any IoC library.
Code exemples
Here is a basic factory method to get a builder. This factory method can be registered into any container library.
private IQueryBuilderFactory GetBuilder()
{
ISqlTranslator translatorFactory() => new SqlTranslator();
ICompare compareFactory() => new Comparator();
IWhereBuilderFactory whereBuilderFactory() => new WhereBuilderFactory(compareFactory);
return new SqlQueryBuilderFactory(translatorFactory, whereBuilderFactory, compareFactory);
}
A basic SELECT query
Simply write your query with terms you are familiar with.
bool isValid = GetBuilder().GetSelect().From<Car>()
.SelectAll<Car>()
.Where(comparator => comparator.Compare<Car>(car => car.ModelYear).With(Operators.GT, "@year"))
.TryBuild(out string query);
//@year can later be replaced with your favorite library
Resulting SQL:
SELECT [Car].*
FROM [Car]
WHERE [CarMaker].[ModelYear] > @year
DELETE FROM [Car]
JOIN [CarMaker] ON [Car].[CarMakerId] = [CarMaker].[Id]
WHERE ((([CarMaker].[FoundationDate]) < (1950-01-01)) OR (([Car].[Mileage]) <= (50000)))
Table alias
You can use table aliases if you want to join the same table multiple times.
SELECT [MAKER1].*
FROM [CarMaker] AS [MAKER1]
JOIN [CarMaker] AS [MAKER2] ON [Maker1].[CountryOfOriginId] = [Maker2].[CountryOfOriginId]
WHERE [Maker1].[Id] <> [Maker2].Id
A more complex SELECT query
Here is a more complex query. Note the use of a complex selector (average aggregate).
SELECT AVG([Car].[Price]) AS [AveragePrice], [CarMaker].[Name], [Car].[ModelYear]
FROM [Car]
JOIN [CarMaker] ON [Car].[CarMakerId] = [CarMaker].[Id]
GROUP BY [Car].[ModelYear], [CarMaker].[Name]
A complex selector is described as a class. Simply inherit SelectBuilder to create your own easily. The generic type <T> will enforce (or not using object) a specific type on your special selector. For example, here is a "DATEDIFF" implementation that requires the selector to be of a DateTime type.
People's car tastes can be all over the place, and so can be your "WHERE" clauses! Here are some "WHERE" conditions extracted as functions so we can use them later.
SELECT [Car].[Id], [Car].[Price]
FROM [Car]
JOIN [CarMaker] ON [Car].[CarMakerId] = [CarMaker].[Id]
JOIN [Country] ON [CarMaker].[CountryOfOriginId] = [Country].[Id]
WHERE (
((([Car].[Mileage]) < (@cheap_mileage)) AND
(([Car].[Price]) < (@cheap_price)) AND
(([CarMaker].[Name]) <> (@cheap_maker)) AND
(([Country].[Name]) <> (@cheap_country))
) OR (
(([Car].[Mileage]) < (@dream_mileage)) AND
(([Car].[Price]) < (@dream_price)) AND
(([CarMaker].[Name]) = (@dream_maker)))
)
ORDER BY [Car].[Price] DESC
Does Rem0o/SqlQueryBuilder have a project website?
No homepage URL was recorded for Rem0o/SqlQueryBuilder in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on Rem0o/SqlQueryBuilder?
The most recent commit recorded on Rem0o/SqlQueryBuilder was 7.4 years ago, based on the GitHub push timestamp. The repository has 9 forks — one of the better signals of community interest.
How many stars does Rem0o/SqlQueryBuilder have?
Rem0o/SqlQueryBuilder has 14 GitHub stars — refresh the page for the live number, or check github.com/Rem0o/SqlQueryBuilder. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is Rem0o/SqlQueryBuilder open source?
TopGit's metadata for Rem0o/SqlQueryBuilder does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What else is in the Backend space?
Rem0o/SqlQueryBuilder is tracked by TopGit under the Backend category, alongside 5 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What topics is Rem0o/SqlQueryBuilder associated with?
GitHub's repository topics for Rem0o/SqlQueryBuilder: "csharp", "dotnetstandard", "sql", "sql-query", "sql-query-builder". TopGit's editorial category is Backend.
Where do I read more about Rem0o/SqlQueryBuilder?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/Rem0o/SqlQueryBuilder is the definitive source.
Read full README in the tab above.
Still deciding about SqlQueryBuilder?
One click hands the question to an AI along with this page — see what it says about SqlQueryBuilder.