Skip to content

Commit 014d3fd

Browse files
Format
1 parent 08f9b27 commit 014d3fd

64 files changed

Lines changed: 595 additions & 515 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<IsPackable>false</IsPackable>
4-
<IsTestProject>true</IsTestProject>
5-
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Testing.ruleset</CodeAnalysisRuleSet>
6-
<WarningsNotAsErrors>CA1307;xUnit1030</WarningsNotAsErrors>
7-
<NoWarn>$(NoWarn);CA1307;xUnit1030</NoWarn>
8-
</PropertyGroup>
9-
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
11-
<PackageReference Include="xunit" Version="2.9.2" />
12-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
13-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14-
<PrivateAssets>all</PrivateAssets>
15-
</PackageReference>
16-
<PackageReference Include="coverlet.collector" Version="6.0.2">
17-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18-
<PrivateAssets>all</PrivateAssets>
19-
</PackageReference>
20-
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
21-
</ItemGroup>
22-
<ItemGroup>
23-
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
24-
<ProjectReference Include="../DataProvider.Example/DataProvider.Example.csproj" />
25-
<ProjectReference Include="../../Lql/Lql.SQLite/Lql.SQLite.csproj" />
26-
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
27-
</ItemGroup>
28-
</Project>
2+
<PropertyGroup>
3+
<IsPackable>false</IsPackable>
4+
<IsTestProject>true</IsTestProject>
5+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Testing.ruleset</CodeAnalysisRuleSet>
6+
<WarningsNotAsErrors>CA1307;xUnit1030</WarningsNotAsErrors>
7+
<NoWarn>$(NoWarn);CA1307;xUnit1030</NoWarn>
8+
</PropertyGroup>
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
11+
<PackageReference Include="xunit" Version="2.9.2" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
<PrivateAssets>all</PrivateAssets>
15+
</PackageReference>
16+
<PackageReference Include="coverlet.collector" Version="6.0.2">
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
<PrivateAssets>all</PrivateAssets>
19+
</PackageReference>
20+
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
24+
<ProjectReference Include="../DataProvider.Example/DataProvider.Example.csproj" />
25+
<ProjectReference Include="../../Lql/Lql.SQLite/Lql.SQLite.csproj" />
26+
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
27+
</ItemGroup>
28+
</Project>
Lines changed: 81 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,89 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<OutputType>Exe</OutputType>
4-
<NoWarn>EPC12;CA1303;CA1515</NoWarn>
5-
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
6-
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Example.ruleset</CodeAnalysisRuleSet>
7-
<WarningsNotAsErrors>CA1303</WarningsNotAsErrors>
8-
<EnableLqlTranspile>true</EnableLqlTranspile>
9-
</PropertyGroup>
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<NoWarn>EPC12;CA1303;CA1515</NoWarn>
5+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
6+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Example.ruleset</CodeAnalysisRuleSet>
7+
<WarningsNotAsErrors>CA1303</WarningsNotAsErrors>
8+
<EnableLqlTranspile>true</EnableLqlTranspile>
9+
</PropertyGroup>
1010

11-
<!-- Exclude Generated folder from default globbing - we include it explicitly in the target -->
12-
<ItemGroup>
13-
<Compile Remove="Generated/**" />
14-
</ItemGroup>
11+
<!-- Exclude Generated folder from default globbing - we include it explicitly in the target -->
12+
<ItemGroup>
13+
<Compile Remove="Generated/**" />
14+
</ItemGroup>
1515

16+
<ItemGroup>
17+
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
18+
<ProjectReference Include="../../Lql/Lql.SQLite/Lql.SQLite.csproj" />
19+
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
20+
<ProjectReference Include="../../Migration/Migration/Migration.csproj" />
21+
<ProjectReference Include="../../Migration/Migration.SQLite/Migration.SQLite.csproj" />
22+
</ItemGroup>
23+
<ItemGroup>
24+
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
25+
</ItemGroup>
26+
<ItemGroup>
27+
<AdditionalFiles Include="GetInvoices.sql" />
28+
<AdditionalFiles Include="GetInvoices.grouping.json" />
29+
<AdditionalFiles Include="GetOrders.sql" />
30+
<AdditionalFiles Include="GetOrders.grouping.json" />
31+
<AdditionalFiles Include="GetCustomersLql.lql" />
32+
<AdditionalFiles Include="GetCustomersLql.grouping.json" />
33+
<AdditionalFiles Include="DataProvider.json" />
34+
</ItemGroup>
35+
36+
<!-- YAML schema is source of truth, stored in git -->
37+
<ItemGroup>
38+
<Content Include="example-schema.yaml">
39+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
40+
</Content>
41+
</ItemGroup>
42+
43+
<!-- Create database from YAML using Migration.Cli (YAML stored in git) -->
44+
<Target Name="CreateDatabaseSchema" BeforeTargets="TranspileLqlAndGenerateDataProvider">
45+
<Exec
46+
Command="dotnet run --project &quot;$(MSBuildThisFileDirectory)../../Migration/Migration.Cli/Migration.Cli.csproj&quot; -- --schema &quot;$(MSBuildProjectDirectory)/example-schema.yaml&quot; --output &quot;$(MSBuildProjectDirectory)/invoices.db&quot; --provider sqlite"
47+
WorkingDirectory="$(MSBuildProjectDirectory)"
48+
StandardOutputImportance="High"
49+
StandardErrorImportance="High"
50+
/>
51+
</Target>
52+
53+
<!-- Pre-compile: transpile LQL to SQL, then generate C# from SQL using external CLI -->
54+
<Target
55+
Name="TranspileLqlAndGenerateDataProvider"
56+
BeforeTargets="BeforeCompile;CoreCompile"
57+
Inputs="$(MSBuildProjectDirectory)/DataProvider.json;@(AdditionalFiles);@(LqlFiles)"
58+
Outputs="$(MSBuildProjectDirectory)/Generated/.timestamp"
59+
>
60+
<!-- Clean and recreate Generated folder to avoid stale files -->
61+
<RemoveDir Directories="$(MSBuildProjectDirectory)/Generated" />
62+
<MakeDir Directories="$(MSBuildProjectDirectory)/Generated" />
63+
<!-- Transpile each .lql to .sql into project directory (or Intermediate) -->
1664
<ItemGroup>
17-
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
18-
<ProjectReference Include="../../Lql/Lql.SQLite/Lql.SQLite.csproj" />
19-
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
20-
<ProjectReference Include="../../Migration/Migration/Migration.csproj" />
21-
<ProjectReference Include="../../Migration/Migration.SQLite/Migration.SQLite.csproj" />
22-
</ItemGroup>
23-
<ItemGroup>
24-
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
25-
</ItemGroup>
26-
<ItemGroup>
27-
<AdditionalFiles Include="GetInvoices.sql" />
28-
<AdditionalFiles Include="GetInvoices.grouping.json" />
29-
<AdditionalFiles Include="GetOrders.sql" />
30-
<AdditionalFiles Include="GetOrders.grouping.json" />
31-
<AdditionalFiles Include="GetCustomersLql.lql" />
32-
<AdditionalFiles Include="GetCustomersLql.grouping.json" />
33-
<AdditionalFiles Include="DataProvider.json" />
65+
<LqlFiles Include="$(MSBuildProjectDirectory)/**/*.lql" />
3466
</ItemGroup>
35-
36-
<!-- YAML schema is source of truth, stored in git -->
67+
<Message Importance="High" Text="Transpiling LQL files (@(LqlFiles))" />
68+
<Exec
69+
Command="dotnet run --project $(MSBuildProjectDirectory)/../../Lql/LqlCli.SQLite/LqlCli.SQLite.csproj -- --input &quot;%(LqlFiles.Identity)&quot; --output &quot;%(LqlFiles.RootDir)%(LqlFiles.Directory)%(LqlFiles.Filename).generated.sql&quot;"
70+
Condition="'$(EnableLqlTranspile)' == 'true' and @(LqlFiles) != ''"
71+
WorkingDirectory="$(MSBuildProjectDirectory)"
72+
StandardOutputImportance="High"
73+
StandardErrorImportance="High"
74+
ContinueOnError="WarnAndContinue"
75+
/>
76+
<!-- Run SQLite generator CLI to emit .g.cs into Generated folder -->
77+
<Exec
78+
Command="dotnet run --project $(MSBuildThisFileDirectory)../DataProvider.SQLite.Cli/DataProvider.SQLite.Cli.csproj -- --project-dir &quot;$(MSBuildProjectDirectory)&quot; --config &quot;$(MSBuildProjectDirectory)/DataProvider.json&quot; --out &quot;$(MSBuildProjectDirectory)/Generated&quot;"
79+
WorkingDirectory="$(MSBuildProjectDirectory)"
80+
StandardOutputImportance="High"
81+
StandardErrorImportance="High"
82+
IgnoreExitCode="true"
83+
/>
84+
<Touch Files="$(MSBuildProjectDirectory)/Generated/.timestamp" AlwaysCreate="true" />
3785
<ItemGroup>
38-
<Content Include="example-schema.yaml">
39-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
40-
</Content>
86+
<Compile Include="$(MSBuildProjectDirectory)/Generated/**/*.g.cs" />
4187
</ItemGroup>
42-
43-
<!-- Create database from YAML using Migration.Cli (YAML stored in git) -->
44-
<Target Name="CreateDatabaseSchema" BeforeTargets="TranspileLqlAndGenerateDataProvider">
45-
<Exec Command='dotnet run --project "$(MSBuildThisFileDirectory)../../Migration/Migration.Cli/Migration.Cli.csproj" -- --schema "$(MSBuildProjectDirectory)/example-schema.yaml" --output "$(MSBuildProjectDirectory)/invoices.db" --provider sqlite' WorkingDirectory='$(MSBuildProjectDirectory)' StandardOutputImportance='High' StandardErrorImportance='High' />
46-
</Target>
47-
48-
<!-- Pre-compile: transpile LQL to SQL, then generate C# from SQL using external CLI -->
49-
<Target Name="TranspileLqlAndGenerateDataProvider" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildProjectDirectory)/DataProvider.json;@(AdditionalFiles);@(LqlFiles)" Outputs="$(MSBuildProjectDirectory)/Generated/.timestamp">
50-
<!-- Clean and recreate Generated folder to avoid stale files -->
51-
<RemoveDir Directories="$(MSBuildProjectDirectory)/Generated" />
52-
<MakeDir Directories="$(MSBuildProjectDirectory)/Generated" />
53-
<!-- Transpile each .lql to .sql into project directory (or Intermediate) -->
54-
<ItemGroup>
55-
<LqlFiles Include="$(MSBuildProjectDirectory)/**/*.lql" />
56-
</ItemGroup>
57-
<Message Importance="High" Text="Transpiling LQL files (@(LqlFiles))" />
58-
<Exec Command='dotnet run --project $(MSBuildProjectDirectory)/../../Lql/LqlCli.SQLite/LqlCli.SQLite.csproj -- --input &quot;%(LqlFiles.Identity)&quot; --output &quot;%(LqlFiles.RootDir)%(LqlFiles.Directory)%(LqlFiles.Filename).generated.sql&quot;' Condition="'$(EnableLqlTranspile)' == 'true' and @(LqlFiles) != ''" WorkingDirectory='$(MSBuildProjectDirectory)' StandardOutputImportance='High' StandardErrorImportance='High' ContinueOnError="WarnAndContinue" />
59-
<!-- Run SQLite generator CLI to emit .g.cs into Generated folder -->
60-
<Exec Command='dotnet run --project $(MSBuildThisFileDirectory)../DataProvider.SQLite.Cli/DataProvider.SQLite.Cli.csproj -- --project-dir &quot;$(MSBuildProjectDirectory)&quot; --config &quot;$(MSBuildProjectDirectory)/DataProvider.json&quot; --out &quot;$(MSBuildProjectDirectory)/Generated&quot;' WorkingDirectory='$(MSBuildProjectDirectory)' StandardOutputImportance='High' StandardErrorImportance='High' IgnoreExitCode='true' />
61-
<Touch Files="$(MSBuildProjectDirectory)/Generated/.timestamp" AlwaysCreate="true" />
62-
<ItemGroup>
63-
<Compile Include="$(MSBuildProjectDirectory)/Generated/**/*.g.cs" />
64-
</ItemGroup>
65-
</Target>
88+
</Target>
6689
</Project>
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<OutputType>Exe</OutputType>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
8-
<EnableNETAnalyzers>false</EnableNETAnalyzers>
9-
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
10-
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
11-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
12-
<NoWarn>EPC12;CA2100</NoWarn>
13-
<PackageId>DataProvider.Postgres.Cli</PackageId>
14-
<PackAsTool>true</PackAsTool>
15-
<ToolCommandName>dataprovider-postgres</ToolCommandName>
16-
<Description>CLI tool for generating type-safe PostgreSQL data access code</Description>
17-
</PropertyGroup>
18-
<ItemGroup>
19-
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
20-
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
21-
</ItemGroup>
22-
<ItemGroup>
23-
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
24-
<PackageReference Include="Npgsql" Version="9.0.2" />
25-
<!-- Uses SqlParserCS 0.6.5 from Directory.Build.props -->
26-
</ItemGroup>
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
8+
<EnableNETAnalyzers>false</EnableNETAnalyzers>
9+
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
10+
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
11+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
12+
<NoWarn>EPC12;CA2100</NoWarn>
13+
<PackageId>DataProvider.Postgres.Cli</PackageId>
14+
<PackAsTool>true</PackAsTool>
15+
<ToolCommandName>dataprovider-postgres</ToolCommandName>
16+
<Description>CLI tool for generating type-safe PostgreSQL data access code</Description>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
20+
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
21+
</ItemGroup>
22+
<ItemGroup>
23+
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
24+
<PackageReference Include="Npgsql" Version="9.0.2" />
25+
<!-- Uses SqlParserCS 0.6.5 from Directory.Build.props -->
26+
</ItemGroup>
2727
</Project>
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<OutputType>Exe</OutputType>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
8-
<EnableNETAnalyzers>false</EnableNETAnalyzers>
9-
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
10-
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
11-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
12-
<NoWarn>EPC12;CA2100</NoWarn>
13-
<PackageId>DataProvider.SQLite.Cli</PackageId>
14-
<PackAsTool>true</PackAsTool>
15-
<ToolCommandName>dataprovider-sqlite</ToolCommandName>
16-
<Description>CLI tool for generating type-safe SQLite data access code</Description>
17-
</PropertyGroup>
18-
<ItemGroup>
19-
<ProjectReference Include="../DataProvider.SQLite/DataProvider.SQLite.csproj" />
20-
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
21-
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
22-
</ItemGroup>
23-
<ItemGroup>
24-
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
25-
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
26-
</ItemGroup>
27-
</Project>
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
8+
<EnableNETAnalyzers>false</EnableNETAnalyzers>
9+
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
10+
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
11+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
12+
<NoWarn>EPC12;CA2100</NoWarn>
13+
<PackageId>DataProvider.SQLite.Cli</PackageId>
14+
<PackAsTool>true</PackAsTool>
15+
<ToolCommandName>dataprovider-sqlite</ToolCommandName>
16+
<Description>CLI tool for generating type-safe SQLite data access code</Description>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<ProjectReference Include="../DataProvider.SQLite/DataProvider.SQLite.csproj" />
20+
<ProjectReference Include="../DataProvider/DataProvider.csproj" />
21+
<ProjectReference Include="../../Other/Selecta/Selecta.csproj" />
22+
</ItemGroup>
23+
<ItemGroup>
24+
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
25+
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
26+
</ItemGroup>
27+
</Project>

0 commit comments

Comments
 (0)