Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql 1.0.0-alpha-1

This is a prerelease version of Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql.
dotnet add package Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql --version 1.0.0-alpha-1
NuGet\Install-Package Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql -Version 1.0.0-alpha-1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql" Version="1.0.0-alpha-1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql --version 1.0.0-alpha-1
#r "nuget: Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql, 1.0.0-alpha-1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql as a Cake Addin
#addin nuget:?package=Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql&version=1.0.0-alpha-1&prerelease

// Install Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql as a Cake Tool
#tool nuget:?package=Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql&version=1.0.0-alpha-1&prerelease

Infrastructure.Data.QueryBuilder.MySql

Infrastructure Data QueryBuilder MySQL library used in projects created by the Code Generator tool.

This project contains the implementation for using the Query Builder MySQL.

Tolitech Code Generator Tool: http://www.tolitech.com.br

Examples:

SqlBuilderConfiguration.UseMySql();
var person = new PersonEntity()
{
    PersonId = 1,
    Name = "Person 1",
    Age = 18
};

string sql = new SqlBuilder()
    .Insert("base", "Person")
    .AddColumns(person)
    .Build();

string expected = "insert into base_Person (PersonId, Name, Age) values (@PersonId, @Name, @Age);";
var person = new PersonEntity()
{
    Name = "Person 1",
    Age = 18
};

string sql = new SqlBuilder()
    .Insert("Person")
    .AddColumns(person)
    .Identity("PersonId")
    .Build();

string expected = "insert into Person (Name, Age) values (@Name, @Age); select LAST_INSERT_ID();";
var person = new PersonEntity()
{
    PersonId = 1,
    Name = "Person 1",
    Age = 18
};

string sql = new SqlBuilder()
    .Update("base", "Person")
    .AddColumns(person)
    .RemoveColumn(nameof(person.PersonId))
    .Where()
    .AddColumn(nameof(person.PersonId))
    .Build();

string expected = "update base_Person set Name = @Name, Age = @Age where PersonId = @PersonId;";
string sql = new SqlBuilder()
    .Delete("base", "Person")
    .Where()
    .AddColumn("PersonId")
    .AddCondition("and Age > @Age")
    .Build();

string expected = "delete from base_Person where PersonId = @PersonId and Age > @Age;";
string sql = new SqlBuilder()
    .Select("base", "Person")
    .AddColumns("PersonId", "Name")
    .Where()
    .AddColumn("PersonId")
    .AddCondition("and Age > @Age")
    .Build();

string expected = "select PersonId, Name from base_Person where PersonId = @PersonId and Age > @Age;";
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.0-alpha-1 124 2/14/2022

More information at http://www.tolitech.com.br/