Skip to content

Commit d20e930

Browse files
chore: update readme
1 parent 82ea97e commit d20e930

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

README.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<strong>SqlKata Query Builder</strong>
2+
<strong style="font-size: 2em;">SqlKata Query Builder</strong>
33
</p>
44
<p align="center">
55
<img src="https://github.com/sqlkata/querybuilder/actions/workflows/build.yml/badge.svg">
@@ -9,31 +9,24 @@
99
<a href="https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fsqlkata%2Fquerybuilder"><img alt="Twitter" src="https://img.shields.io/twitter/url?label=Tweet%20about%20SqlKata&style=social&url=https%3A%2F%2Fgithub.com%2Fsqlkata%2Fquerybuilder"></a>
1010
</p>
1111

12-
1312
<p align="center">
14-
<strong>Follow and Upvote SqlKata on Product Hunt to encourage the development of this project</strong>
13+
<strong>Follow and Upvote SqlKata on Product Hunt to encourage the development of this project</strong>
1514
</p>
1615
<p align="center">
17-
<a href="https://www.producthunt.com/products/sqlkata?utm_source=badge-follow&utm_medium=badge&utm_souce=badge-sqlkata" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/follow.svg?post_id=398417&theme=light" alt="SqlKata - Dynamic&#0032;Sql&#0032;query&#0032;builder&#0032;for&#0032;dotnet | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
16+
<a href="https://www.producthunt.com/products/sqlkata?utm_source=badge-follow&utm_medium=badge&utm_souce=badge-sqlkata" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/follow.svg?post_id=398417&theme=light" alt="SqlKata - Dynamic&#0032;Sql&#0032;query&#0032;builder&#0032;for&#0032;dotnet | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
1817
</p>
1918

19+
https://private-user-images.githubusercontent.com/2517523/408899411-1f9ff89b-ed17-4d02-ae2f-afc1c66a5932.mp4
2020

21-
![Quick Demo](https://i.imgur.com/jOWD4vk.gif)
22-
23-
24-
SqlKata Query Builder is a powerful Sql Query Builder written in C#.
25-
26-
It's secure and framework agnostic. Inspired by the top Query Builders available, like Laravel Query Builder and Knex.
27-
28-
SqlKata has an expressive API. it follows a clean naming convention, which is very similar to the SQL syntax.
29-
30-
By providing a level of abstraction over the supported database engines, that allows you to work with multiple databases with the same unified API.
21+
## 🚀 Introduction
3122

32-
SqlKata supports complex queries, such as nested conditions, selection from SubQuery, filtering over SubQueries, Conditional Statements and others. Currently, it has built-in compilers for SqlServer, MySql, PostgreSQL, and Firebird.
23+
SqlKata Query Builder is a powerful SQL query builder written in C#. It is secure, framework-agnostic, and inspired by top query builders like Laravel Query Builder and Knex.
3324

34-
The SqlKata.Execution package provides the ability to submit the queries to the database, using [Dapper](https://github.com/StackExchange/Dapper) under the covers.
35-
36-
Checkout the full documentation on [https://sqlkata.com](https://sqlkata.com)
25+
### ✨ Key Features
26+
- **Expressive API**: Clean and intuitive syntax similar to SQL.
27+
- **Database Agnostic**: Work with multiple databases using a unified API.
28+
- **Complex Queries**: Supports nested conditions, subqueries, conditional statements, and more.
29+
- **Execution Support**: Use the SqlKata.Execution package to execute queries with Dapper.
3730

3831
## Installation
3932

@@ -42,48 +35,50 @@ $ dotnet add package SqlKata
4235
$ dotnet add package SqlKata.Execution # (optional) If you want the execution support
4336
```
4437

45-
4638
## Quick Examples
4739

4840
### Setup Connection
4941

5042
```cs
5143
var connection = new SqlConnection("...");
5244
var compiler = new SqlCompiler();
53-
54-
var db = new QueryFactory(connection, compiler)
45+
var db = new QueryFactory(connection, compiler);
5546
```
56-
5747
> `QueryFactory` is provided by the SqlKata.Execution package.
5848
5949
### Retrieve all records
50+
6051
```cs
6152
var books = db.Query("Books").Get();
6253
```
6354

6455
### Retrieve published books only
56+
6557
```cs
6658
var books = db.Query("Books").WhereTrue("IsPublished").Get();
6759
```
6860

6961
### Retrieve one book
62+
7063
```cs
7164
var introToSql = db.Query("Books").Where("Id", 145).Where("Lang", "en").First();
7265
```
7366

7467
### Retrieve recent books: last 10
68+
7569
```cs
7670
var recent = db.Query("Books").OrderByDesc("PublishedAt").Limit(10).Get();
7771
```
7872

7973
### Include Author information
74+
8075
```cs
8176
var books = db.Query("Books")
82-
.Include(db.Query("Authors")) // Assumes that the Books table have a `AuthorId` column
77+
.Include(db.Query("Authors")) // Assumes that the Books table has an `AuthorId` column
8378
.Get();
8479
```
8580

86-
This will include the property "Author" on each "Book"
81+
This will include the property "Author" on each "Book":
8782
```jsonc
8883
[{
8984
"Id": 1,
@@ -111,6 +106,7 @@ foreach(var book in books)
111106
```
112107

113108
### Conditional queries
109+
114110
```cs
115111
var isFriday = DateTime.Today.DayOfWeek == DayOfWeek.Friday;
116112

@@ -159,16 +155,22 @@ int affected = db.Query("Users").Where("Id", 1).Delete();
159155
```
160156

161157
## FAQ
158+
162159
### How to know when a new release or a feature is available?
163-
I announce updates on My [Twitter Account](https://twitter.com/ahmadmuzavi), and you can subscribe to our newsletters from the website https://sqlkata.com
160+
161+
I announce updates on my [Twitter Account](https://twitter.com/ahmadmuzavi), and you can subscribe to our newsletters from the website [https://sqlkata.com](https://sqlkata.com).
164162

165163
### The database that I want is not supported. Why?
166-
It's impossible to support all available database vendors, this is why we focus on the major ones, and we encourage you to create your own compiler for your database.
164+
165+
It's impossible to support all available database vendors, which is why we focus on the major ones. We encourage you to create your own compiler for your database.
167166

168167
### Do you accept new compilers?
169-
Unfortunately, no, the reason is this will add overhead for the project contributors. We prefer to improve the quality of the existing compilers instead.
168+
169+
Unfortunately, no. The reason is that this would add overhead for the project contributors. We prefer to improve the quality of the existing compilers instead.
170170

171171
### How can I support the project?
172-
- Star the project here in Github, and share it with your friends
173-
- Follow and upvote it on Product Hunt <a href="https://www.producthunt.com/products/sqlkata?utm_source=badge-follow&utm_medium=badge&utm_souce=badge-sqlkata" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/follow.svg?post_id=398417&theme=light&size=small" alt="SqlKata - Dynamic&#0032;Sql&#0032;query&#0032;builder&#0032;for&#0032;dotnet | Product Hunt" style="width: 86px; height: 32px;" width="250" height="54" /></a>
174-
- You can also donate to support the project financially on open collection.
172+
173+
- ⭐ Star the project here on GitHub, and share it with your friends.
174+
- 🐱‍💻 Follow and upvote it on Product Hunt:
175+
<a href="https://www.producthunt.com/products/sqlkata?utm_source=badge-follow&utm_medium=badge&utm_souce=badge-sqlkata" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/follow.svg?post_id=398417&theme=light&size=small" alt="SqlKata - Dynamic&#0032;Sql&#0032;query&#0032;builder&#0032;for&#0032;dotnet | Product Hunt" style="width: 86px; height: 32px;" width="250" height="54" /></a>
176+
- 💰 You can also donate to support the project financially on open collection.

0 commit comments

Comments
 (0)