https://github.com/louisdevie/kiwiq
https://github.com/louisdevie/kiwiq
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/louisdevie/kiwiq
- Owner: louisdevie
- License: mit
- Created: 2023-09-13T18:09:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T12:11:52.000Z (8 months ago)
- Last Synced: 2025-02-02T10:34:40.733Z (5 months ago)
- Language: C#
- Size: 222 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
KiwiQuery
![]()
[](https://www.nuget.org/packages/KiwiQuery/)
[](https://codecov.io/github/louisdevie/kiwiq)
[](https://github.com/louisdevie/kiwiq/actions/workflows/Tests.yml)
[](https://kiwiq.readthedocs.io/latest/?badge=latest)*Note : this library is still in early development. Lots of features are missing and some parts of the API may change completly in the next updates.*
KiwiQuery is a SQL query builder for MySQL. It is compatible with both [`MySql.Data`](https://www.nuget.org/packages/MySql.Data) and [`MySqlConnector`](https://www.nuget.org/packages/MySqlConnector) and can technically work with any ADO.NET connector, though it doesn't support other SQL dialects.
The queries are built using a DSL that tries to mimic the way SQL is written, for example :
```cs
var results = db.Select("id", "name").From("books")
.Where(db.Column("publishingDate") > new DateTime(2020, 01, 01))
.Fetch();
``````cs
db.InsertInto("books")
.Value("name", "Illuminae, Tome 1 : Dossier Alexander")
.Value("publishingDate", new DateTime(2016, 9, 14))
.Value("authors", "Amie Kaufman;Jay Kristoff")
.Apply();
```