Skip to content

Commit a5cd624

Browse files
author
DAIKOZ
committed
SQLWrapper 2.0.0
1 parent bb4f2fd commit a5cd624

20 files changed

+1034
-569
lines changed
Lines changed: 62 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,78 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<LangVersion>latest</LangVersion>
6-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
7-
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
8-
<Version>1.1.19</Version>
9-
<Authors>DAIKOZ</Authors>
10-
<Company>DAIKOZ</Company>
11-
<Copyright>© 2020 - DAIKOZ - All rights reserved</Copyright>
12-
<PackageLicense>https://www.sqlwrapper.com</PackageLicense>
13-
<PackageProjectUrl>https://www.sqlwrapper.com</PackageProjectUrl>
14-
<RepositoryUrl>https://github.com/daikoz/SQLWrapper</RepositoryUrl>
15-
<PackageTags>sql;wrapper;sqlwrapper;ado;dapper;mysql;mariadb;sql wrapper</PackageTags>
16-
<PackageReleaseNotes></PackageReleaseNotes>
17-
<Title>SQLWrapper</Title>
18-
<Description>
19-
A high performance SQL Wrapper and syntax checking supporting MySQL, MariaDB... SQLWrapper generate call code from SQL file and check SQL syntax before compile task. The call automatically created and check syntax identify database changes.
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
6+
<EnableNETAnalyzers>True</EnableNETAnalyzers>
7+
<AnalysisLevel>latest</AnalysisLevel>
8+
<LangVersion>latest</LangVersion>
9+
<Nullable>enable</Nullable>
2010

21-
SQL Wrapper is not a ORM: it generate code form SQL request. It have better performance than linq or EntityFramework and there are not SQL limitation.
11+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
12+
<PackageIcon>sqlwrapper.png</PackageIcon>
13+
<Title>SQL Wrapper Generator</Title>
14+
<Version>2.0.0</Version>
15+
<AssemblyVersion>2.0.0</AssemblyVersion>
16+
<FileVersion>2.0.0</FileVersion>
17+
<Authors>DAIKOZ</Authors>
18+
<Description>SQLWrapper makes it easier to create code wrappers for SQL queries. It's a powerful tool that helps speed up development by reducing the need for manual coding. It works with databases various SQL database (MySQL, MariaDB, ...), checking the syntax and performance of SQL queries before you execute them.
2219

23-
SQL Wrapper get database structure to check SQL syntax and generate a XML with all returned columns of SQL request. From this XML, you can apply our XLST (or the XLST provided) to generate the code.
20+
It's important to note that SQLWrapper isn't like other tools that map objects to database tables (ORMs). Instead, it directly generates code from your SQL queries and database structure, which performs better than tools like LINQ, EntityFramework, dapper, ... and doesn't have the same limitations.
2421

25-
Thus, SQL Wrapper can generate SQL call code from any language like C#, Java, Python, Javascript, VB .NET, ADO .NET ...
26-
</Description>
27-
<AssemblyVersion>1.1.19.0</AssemblyVersion>
28-
<FileVersion>1.1.19.0</FileVersion>
29-
<PackageLicenseUrl></PackageLicenseUrl>
30-
<BuildOutputTargetFolder>dll</BuildOutputTargetFolder>
31-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
32-
<NoWarn>NU5100</NoWarn>
33-
<PackageIcon>sqlwrapper.png</PackageIcon>
34-
<PackageIconUrl />
35-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
36-
<EnableNETAnalyzers>true</EnableNETAnalyzers>
37-
</PropertyGroup>
22+
One feature is that it can look at your database's structure to check if your SQL queries are correct, and it can create an XML file listing all the data your queries need and return. Then, you can use XSLT templates to turn that XML into code in languages like C#, and more.
3823

39-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
40-
<PlatformTarget>AnyCPU</PlatformTarget>
41-
</PropertyGroup>
24+
Overall, DAIKOZ.SQLWrapper is a handy tool for making SQL code easier to work with, saving time, and helping you write better code.</Description>
25+
<Copyright>Copyright (c) DAIKOZ. All rights reserved.</Copyright>
26+
<PackageProjectUrl>https://www.sqlwrapper.com</PackageProjectUrl>
27+
<PackageReadmeFile>readme.md</PackageReadmeFile>
28+
<RepositoryUrl>https://github.com/daikoz/SQLWrapper</RepositoryUrl>
29+
<RepositoryType>github</RepositoryType>
30+
<PackageTags>sql;wrapper;sqlwrapper;ORM;dapper;linq;database;mysql;mariadb;server;mssql;pgsql;sqlite;postgres;postgresql;query;builder</PackageTags>
31+
<PackageReleaseNotes>Version 2.0.0:
32+
- increase performance to generate code from sql query
33+
- Add MariaDB database
34+
- Genere code under each sql file</PackageReleaseNotes>
35+
<PackageLicenseFile>license.txt</PackageLicenseFile>
36+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
4237

43-
<ItemGroup>
44-
<PackageReference Include="Microsoft.Build.Framework" Version="16.8.0" PrivateAssets="All" />
45-
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.8.0" PrivateAssets="All" />
46-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" PrivateAssets="All" />
47-
</ItemGroup>
38+
</PropertyGroup>
4839

49-
<ItemGroup>
50-
<Content Include="build\*.targets" PackagePath="build\" />
51-
</ItemGroup>
40+
<Target Name="PostClean" AfterTargets="Clean">
41+
<RemoveDir Directories="$(BaseOutputPath)" />
42+
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
43+
</Target>
5244

53-
<ItemGroup>
54-
<Content Include="tools/**/*.*" PackagePath="tools\" />
55-
</ItemGroup>
45+
<ItemGroup>
46+
<Content Include="build\*.targets" PackagePath="build\" />
47+
</ItemGroup>
5648

57-
<ItemGroup>
58-
<Compile Remove="Properties\PublishProfiles\**" />
59-
<EmbeddedResource Remove="Properties\PublishProfiles\**" />
60-
<None Remove="Properties\PublishProfiles\**" />
61-
<None Include="..\..\Web\SQLWrapper.com\wwwroot\img\sqlwrapper.png">
62-
<Pack>True</Pack>
63-
<PackagePath></PackagePath>
64-
</None>
65-
</ItemGroup>
49+
<ItemGroup>
50+
<Content Include="tools/**/*.*" PackagePath="tools\" />
51+
</ItemGroup>
6652

67-
<ItemGroup>
68-
<Compile Update="Properties\Resources.Designer.cs">
69-
<DesignTime>True</DesignTime>
70-
<AutoGen>True</AutoGen>
71-
<DependentUpon>Resources.resx</DependentUpon>
72-
</Compile>
73-
</ItemGroup>
53+
<ItemGroup>
54+
<None Include="..\..\Web\SQLWrapper.com\wwwroot\img\sqlwrapper.png" Pack="true" PackagePath="\" />
55+
<None Include="readme.md" Pack="true" PackagePath="\" />
56+
<None Include="license.txt" Pack="true" PackagePath="\" />
57+
</ItemGroup>
7458

75-
<ItemGroup>
76-
<Content Update="tools\SQLWrapper.exe">
77-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
78-
</Content>
79-
<Content Update="tools\Template\csharp\ADO.xslt">
80-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
81-
</Content>
82-
<Content Update="tools\Template\csharp\helper.xslt">
83-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
84-
</Content>
85-
</ItemGroup>
59+
<ItemGroup>
60+
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.9.5" />
61+
</ItemGroup>
8662

87-
<ItemGroup>
88-
<EmbeddedResource Update="Properties\Resources.resx">
89-
<Generator>ResXFileCodeGenerator</Generator>
90-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
91-
</EmbeddedResource>
92-
</ItemGroup>
63+
<ItemGroup>
64+
<Compile Update="Resource.Designer.cs">
65+
<DesignTime>True</DesignTime>
66+
<AutoGen>True</AutoGen>
67+
<DependentUpon>Resource.resx</DependentUpon>
68+
</Compile>
69+
</ItemGroup>
9370

94-
<Target Name="PackTaskDependencies" BeforeTargets="GenerateNuspec">
95-
<!--
96-
The include needs to happen after output has been copied to build output folder
97-
but before NuGet generates a nuspec. See https://github.com/NuGet/Home/issues/4704.
98-
-->
99-
<ItemGroup>
100-
<_PackageFiles Include="bin\$(Configuration)\*\Microsoft.Build.Framework.dll;bin\$(Configuration)\*\Microsoft.Build.Utilities.Core.dll;bin\$(Configuration)\*\Microsoft.CSharp.dll;bin\$(Configuration)\*\System.Collections.Immutable.dll;bin\$(Configuration)\*\System.Runtime.Serialization.Primitives.dll;bin\$(Configuration)\*\System.Threading.dll;bin\$(Configuration)\*\System.Threading.Thread.dll">
101-
<PackagePath>dll\</PackagePath>
102-
<Visible>false</Visible>
103-
<BuildAction>Content</BuildAction>
104-
</_PackageFiles>
105-
</ItemGroup>
106-
</Target>
71+
<ItemGroup>
72+
<EmbeddedResource Update="Resource.resx">
73+
<Generator>ResXFileCodeGenerator</Generator>
74+
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
75+
</EmbeddedResource>
76+
</ItemGroup>
10777

10878
</Project>

Daikoz.SQLWrapper/ErrorMessage.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
namespace Daikoz.SQLWrapper
2+
{
3+
internal class ErrorMessage
4+
{
5+
public const string Category = "SQLWrapper";
6+
7+
public static readonly (string ErrorCode, string Message) MsgGlobalException = ("SW00500", "");
8+
public static readonly (string ErrorCode, string Message) MsgConfigurationNotExist = ("SW00501", "SQLWrapper configuration doesn't exist. A default sqlwrapper.json is created in root of your project");
9+
public static readonly (string ErrorCode, string Message) MsgConfigurationWrong = ("SW00502", "Configuration file format is not valid: {0}");
10+
public static readonly (string ErrorCode, string Message) MsgConfigurationDatabaseNameNotDefined = ("SW00503", "Database name not defined");
11+
public static readonly (string ErrorCode, string Message) MsgConfigurationDatabaseNameCharacter = ("SW00504", "Database name contain wrong character: a-z A-Z 0-9 - _");
12+
public static readonly (string ErrorCode, string Message) MsgConfigurationDatabaseConnectionNotDefined = ("SW00505", "Database's connection string is not defined. Cache file cannot be generate.");
13+
public static readonly (string ErrorCode, string Message) MsgConfigurationSQLWrapperToolNotFound = ("SW00506", "sqlwrapper executable not found in: {0}");
14+
public static readonly (string ErrorCode, string Message) MsgSQLWrapperExecution = ("SW00507", "Error during execution of sqlwrapper: {0}");
15+
public static readonly (string ErrorCode, string Message) MsgSQLWrapperHelperOutputFilePathNotDefined = ("SW00508", "Helper output filepath not defined");
16+
public static readonly (string ErrorCode, string Message) MsgConfigurationDatabaseSectionNotDefined = ("SW00509", "No database defined");
17+
public static readonly (string ErrorCode, string Message) MsgConfigurationDatabaseNotFound = ("SW00510", "Database name is not found: {0}");
18+
public static readonly (string ErrorCode, string Message) MsgConfigurationHelperXSLTNotFound = ("SW00511", "XSLT helper file not found: {0}");
19+
public static readonly (string ErrorCode, string Message) MsgSQLWrapperDirectoryNotFound = ("SW00512", "Path to search SQL files not found: {0}");
20+
public static readonly (string ErrorCode, string Message) MsgSQLWrapperSQLFilesNotFound = ("SW00513", "No SQL files ({0}) not found in directory: {1}");
21+
public static readonly (string ErrorCode, string Message) MsgConfigurationWrapperXSLTNotFound = ("SW00514", "XSLT wrapper file not found: {0}");
22+
}
23+
24+
25+
}

Daikoz.SQLWrapper/GlobalSuppressions.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

Daikoz.SQLWrapper/License.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
English version below
3+
4+
-----------------
5+
6+
Licence d'utilisation pour DAIKOZ.SQLWrapper & SQLWrapper
7+
8+
Version 2.0, le 29 mars 2024
9+
10+
1. Autorisation d'utilisation : Sous réserve des termes et conditions de cette licence, DAIKOZ accorde à l'utilisateur final une licence non exclusive et non transférable pour utiliser le programme informatique nommé DAIKOZ.SQLWrapper ou SQLWrapper (ci-après dénommé le "Programme") à des fins personnelles ou commerciales.
11+
12+
2. Restrictions :
13+
a. Modification : L'utilisateur ne peut pas modifier, altérer, ou adapter le Programme, en tout ou en partie, sans l'autorisation écrite préalable de DAIKOZ.
14+
b. Décompilation : L'utilisateur ne peut pas décompiler, désassembler ou tenter de découvrir le code source du Programme.
15+
c. Distribution : L'utilisateur ne peut pas distribuer le Programme, que ce soit gratuitement ou moyennant paiement, sans l'autorisation écrite préalable de DAIKOZ.
16+
17+
3. Droits de propriété intellectuelle : Le Programme reste la propriété exclusive de DAIKOZ. Cette licence ne confère à l'utilisateur aucun droit de propriété sur le Programme, à l'exception du droit limité d'utilisation tel que spécifié aux termes de cette licence.
18+
19+
4. Aucune garantie : Le Programme est fourni "tel quel", sans aucune garantie expresse ou implicite, y compris, mais sans s'y limiter, les garanties de qualité marchande, d'adéquation à un usage particulier et d'absence de contrefaçon. En aucun cas DAIKOZ ne sera responsable de tout dommage direct, indirect, accessoire, spécial, exemplaire ou consécutif découlant de l'utilisation ou de l'incapacité à utiliser le Programme, même si DAIKOZ a été informé de la possibilité de tels dommages.
20+
21+
5. Durée de la licence : Cette licence est effective à compter de la date de téléchargement ou de l'installation du Programme par l'utilisateur et restera en vigueur jusqu'à résiliation. DAIKOZ se réserve le droit de résilier cette licence à tout moment en cas de violation des termes de cette licence par l'utilisateur. En cas de résiliation, l'utilisateur doit cesser toute utilisation du Programme et détruire toutes les copies du Programme en sa possession.
22+
23+
6. Loi applicable : Cette licence sera régie et interprétée conformément aux lois en vigueur en France. Tout litige découlant de cette licence sera soumis à la compétence exclusive des tribunaux de ladite juridiction.
24+
25+
En acceptant ces termes, l'utilisateur reconnaît avoir lu, compris et accepté les conditions de cette licence. Si l'utilisateur n'accepte pas ces termes, il ne doit pas utiliser le Programme.
26+
27+
28+
-----------------
29+
30+
31+
License Agreement for DAIKOZ.SQLWrapper & SQLWrapper
32+
33+
Version 2.0, March 29, 2024
34+
35+
1. Permission to Use: Subject to the terms and conditions of this license, DAIKOZ grants the end user a non-exclusive, non-transferable license to use the computer program named DAIKOZ.SQLWrapper or SQLWrapper (hereinafter referred to as the "Program") for personal or commercial purposes.
36+
37+
2. Restrictions :
38+
a. Modification: The user may not modify, alter, or adapt the Program, in whole or in part, without the prior written consent of DAIKOZ.
39+
b. Decompilation: The User may not decompile, disassemble or otherwise attempt to discover the source code of the Program.
40+
c. Distribution: The User may not distribute the Program, whether free of charge or for a fee, without the prior written consent of DAIKOZ.
41+
42+
3. Intellectual property rights: The Program remains the exclusive property of DAIKOZ. This license does not grant the user any ownership rights to the Program, except for the limited right of use as specified in the terms of this license.
43+
44+
4. No warranties: The Program is provided "as is", without warranty of any kind, either express or implied, including, but not limited to, warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall DAIKOZ be liable for any direct, indirect, incidental, special, exemplary or consequential damages arising out of the use or inability to use the Program, even if DAIKOZ has been advised of the possibility of such damages.
45+
46+
5. Term of license: This license is effective from the date of download or installation of the Program by the user and will remain in effect until terminated. DAIKOZ reserves the right to terminate this license at any time in the event of User's breach of the terms of this license. Upon termination, the User must cease all use of the Program and destroy all copies of the Program in its possession.
47+
48+
6. Applicable law: This license shall be governed by and construed in accordance with the laws of France. Any dispute arising under this license shall be subject to the exclusive jurisdiction of the courts of the said jurisdiction.
49+
50+
By accepting these terms, the user acknowledges having read, understood and accepted the conditions of this license. If the user does not accept these terms, he/she must not use the Program.

Daikoz.SQLWrapper/Properties/launchSettings.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)