Gedaq 10.0.0
dotnet add package Gedaq --version 10.0.0
NuGet\Install-Package Gedaq -Version 10.0.0
<PackageReference Include="Gedaq" Version="10.0.0" />
<PackageVersion Include="Gedaq" Version="10.0.0" />
<PackageReference Include="Gedaq" />
paket add Gedaq --version 10.0.0
#r "nuget: Gedaq, 10.0.0"
#:package Gedaq@10.0.0
#addin nuget:?package=Gedaq&version=10.0.0
#tool nuget:?package=Gedaq&version=10.0.0
<h1 align="center"> <a>Gedaq</a> </h1> <h1 align="center"> <a href="https://discord.gg/xsR5EYU4ZM"><img height="30px" src="https://img.shields.io/badge/Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white"><img></a> </h1> <h3 align="center">
</h3>
Generator for obtaining and mapping data from the database. Generates methods (synchronous and/or asynchronous):
Creating a Command for a query
Method of setting parameters in a Command
Command execution, with data mapping
Creating a QueryBatch Command
Setting parameters in a QueryBatch Command
Get data from a batch Command
Receiving data from a batch of queries, with data mapping
Getting data based on a query, with data mapping
There are versions for all of these methods (if possible):
- Query
- NonQuery
- ЕecuteScalar (return type is determined automatically at the generation stage) <br> It also generates methods specific to each provider, such as BinaryImport and BinaryExport in PostgreSQL.
Supported databases(see examples and documentation in the relevant DB package):<br>
Usage:
For example, we have a Person class:
public class Person
{
public int Id { get; set; }
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
public Identification Identification { get; set; }
}
public class Identification
{
public int Id { get; set; }
public string TypeName { get; set; }
}
We just mark anywhere in the code with a special attribute (class, structure, method) that tells the analyzer to generate the code. Let's mark the Person class itself with an attribute:
[Query(
@"
SELECT
p.id,
p.firstname,
~StartInner::Identification:id~
i.id,
i.typename,
~EndInner::Identification~
p.middlename,
p.lastname
FROM person p
LEFT JOIN identification i ON i.id = p.identification_id
WHERE p.id > $1
",
"GetAllPerson",
typeof(Person),
MethodType.Sync | MethodType.Async
),
Parametr(parametrType: typeof(int), position: 1)
]
public class Person
//...
Now in the code we can call the ready method:
var persons =
connection
.GetAllPerson(49999)
.ToList();
var personsAsync =
await connection
.GetAllPersonAsync(49999)
.ToListAsync();
Comparison with Dapper and DapperAOT of getting 50000 Person in a loop(Size is number of loop iterations) from the database:
.NET 7 Benchmark:
| Method | Size | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| Gedaq.Npgsql | 10 | 445.5 ms | 1.00 | 132.09 MB | 1.00 |
| Dapper | 10 | 749.2 ms | 1.68 | 150.41 MB | 1.14 |
| DapperAOT | 10 | 777.5 ms | 1.75 | 150.4 MB | 1.14 |
| Gedaq.Npgsql | 20 | 901.9 ms | 1.00 | 264.17 MB | 1.00 |
| Dapper | 20 | 1,510.0 ms | 1.68 | 300.81 MB | 1.14 |
| DapperAOT | 20 | 1,505.3 ms | 1.67 | 300.81 MB | 1.14 |
| Gedaq.Npgsql | 30 | 1,366.2 ms | 1.00 | 396.28 MB | 1.00 |
| Dapper | 30 | 2,276.7 ms | 1.67 | 451.22 MB | 1.14 |
| DapperAOT | 30 | 2,279.6 ms | 1.67 | 451.22 MB | 1.14 |
But with Gedaq, we can prepare the command in advance.
var personsCmd = connection.CreateGetAllPersonCommand(prepare: true);
personsCmd.SetGetAllPersonParametrs(49999);
var persons = personsCmd.ExecuteGetAllPersonCommand().ToList();
//or
var personsCmd = await connection.CreateGetAllPersonCommandAsync(prepare: true);
personsCmd.SetGetAllPersonParametrs(49999);
var persons = await personsCmd.ExecuteGetAllPersonCommandAsync().ToListAsync();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 34 | 5/1/2026 |
| 10.0.0-alpha | 26 | 4/30/2026 |
| 1.6.1 | 295 | 9/26/2024 |
| 1.6.0 | 300 | 10/8/2023 |
| 1.5.0 | 254 | 10/2/2023 |
| 1.4.11.1 | 251 | 9/14/2023 |
| 1.4.11 | 263 | 9/14/2023 |
| 1.4.10 | 345 | 6/20/2023 |
| 1.4.9.1 | 302 | 6/20/2023 |
| 1.4.9 | 273 | 6/19/2023 |
| 1.4.8 | 283 | 6/18/2023 |
| 1.4.7.1 | 292 | 6/18/2023 |
| 1.4.7 | 313 | 6/13/2023 |
| 1.4.6.8 | 298 | 6/11/2023 |
| 1.4.6.7 | 308 | 6/11/2023 |
| 1.4.6.6 | 286 | 6/9/2023 |
| 1.4.6.4 | 296 | 6/7/2023 |
| 1.4.6.3 | 312 | 5/29/2023 |
| 1.4.5 | 313 | 5/28/2023 |
| 1.4.4 | 310 | 5/28/2023 |