Skip to content

Commit

Permalink
Fix typo in name of manufacturers report SQL file
Browse files Browse the repository at this point in the history
  • Loading branch information
davewalker5 committed Oct 22, 2023
1 parent 281a73c commit 9d1bb76
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 25 deletions.
12 changes: 10 additions & 2 deletions src/FlightRecorder.BusinessLogic/Factory/FlightRecorderFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
using FlightRecorder.BusinessLogic.Logic;
using FlightRecorder.Data;
using FlightRecorder.Entities.Interfaces;
Expand All @@ -22,7 +23,7 @@ public class FlightRecorderFactory
private readonly Lazy<IDateBasedReport<LocationStatistics>> _locationStatistics = null;
private readonly Lazy<IDateBasedReport<ManufacturerStatistics>> _manufacturerStatistics = null;
private readonly Lazy<IDateBasedReport<ModelStatistics>> _modelStatistics = null;

public FlightRecorderDbContext Context { get; private set; }
public IAirlineManager Airlines { get { return _airlines.Value; } }
public ILocationManager Locations { get { return _locations.Value; } }
public IManufacturerManager Manufacturers { get { return _manufacturers.Value; } }
Expand All @@ -33,11 +34,18 @@ public class FlightRecorderFactory
public IUserManager Users { get { return _users.Value; } }
public ICountryManager Countries { get { return _countries.Value; } }
public IAirportManager Airports { get { return _airports.Value; } }

[ExcludeFromCodeCoverage]
public IDateBasedReport<AirlineStatistics> AirlineStatistics { get { return _airlineStatistics.Value; } }

[ExcludeFromCodeCoverage]
public IDateBasedReport<LocationStatistics> LocationStatistics { get { return _locationStatistics.Value; } }

[ExcludeFromCodeCoverage]
public IDateBasedReport<ManufacturerStatistics> ManufacturerStatistics { get { return _manufacturerStatistics.Value; } }

[ExcludeFromCodeCoverage]
public IDateBasedReport<ModelStatistics> ModelStatistics { get { return _modelStatistics.Value; } }
public FlightRecorderDbContext Context { get; private set; }

public FlightRecorderFactory(FlightRecorderDbContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageId>FlightRecorder.BusinessLogic</PackageId>
<PackageVersion>1.1.0.0</PackageVersion>
<PackageVersion>1.1.1.0</PackageVersion>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) Dave Walker 2020, 2021, 2022, 2023</Copyright>
<Owners>Dave Walker</Owners>
Expand All @@ -16,7 +16,7 @@
<PackageProjectUrl>https://github.com/davewalker5/FlightRecorderDb</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<ReleaseVersion>1.1.0.0</ReleaseVersion>
<ReleaseVersion>1.1.1.0</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -29,7 +29,7 @@
<ItemGroup>
<None Remove="Sql\AirlineStatistics.sql" />
<None Remove="Sql\LocationStatistics.sql" />
<None Remove="Sql\ManufacturerStatistis.sql" />
<None Remove="Sql\ManufacturerStatistics.sql" />
<None Remove="Sql\ModelStatistics.sql" />
</ItemGroup>
<ItemGroup>
Expand All @@ -39,7 +39,7 @@
<EmbeddedResource Include="Sql\LocationStatistics.sql">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Sql\ManufacturerStatistis.sql">
<EmbeddedResource Include="Sql\ManufacturerStatistics.sql">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Sql\ModelStatistics.sql">
Expand Down
16 changes: 16 additions & 0 deletions src/FlightRecorder.BusinessLogic/Sql/ManufacturerStatistics.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SELECT ma.Name,
COUNT( DISTINCT s.Id ) AS "Sightings",
COUNT( DISTINCT f.Id ) AS "Flights",
COUNT( DISTINCT l.Id ) AS "Locations",
COUNT( DISTINCT ai.Id ) AS "Aircraft",
COUNT( DISTINCT m.Id ) AS "Models"
FROM AIRLINE a
INNER JOIN FLIGHT f ON f.Airline_Id = a.Id
INNER JOIN SIGHTING s ON s.Flight_Id = f.Id
INNER JOIN LOCATION l ON l.Id = s.Location_Id
INNER JOIN AIRCRAFT ai ON ai.Id = s.Aircraft_Id
INNER JOIN MODEL m ON m.Id = ai.Model_Id
INNER JOIN MANUFACTURER ma ON ma.Id = m.Manufacturer_Id
WHERE s.Date BETWEEN '$from' AND '$to'
GROUP BY ma.Name
ORDER BY ma.Name ASC;
4 changes: 2 additions & 2 deletions src/FlightRecorder.Data/FlightRecorder.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageId>FlightRecorder.Data</PackageId>
<PackageVersion>1.1.0.0</PackageVersion>
<PackageVersion>1.1.1.0</PackageVersion>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) Dave Walker 2020, 2021, 2022, 2023</Copyright>
<Owners>Dave Walker</Owners>
Expand All @@ -16,7 +16,7 @@
<PackageProjectUrl>https://github.com/davewalker5/FlightRecorderDb</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<ReleaseVersion>1.1.0.0</ReleaseVersion>
<ReleaseVersion>1.1.1.0</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System.Diagnostics.CodeAnalysis;

#nullable disable

namespace FlightRecorder.Data.Migrations
{
[ExcludeFromCodeCoverage]
/// <inheritdoc />
#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
public partial class countries : Migration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// <auto-generated />
using System;
using System.Diagnostics.CodeAnalysis;
using FlightRecorder.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
Expand All @@ -10,6 +11,7 @@
namespace FlightRecorder.Data.Migrations
{
[DbContext(typeof(FlightRecorderDbContext))]
[ExcludeFromCodeCoverage]
partial class FlightRecorderDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageId>FlightRecorder.DataExchange</PackageId>
<PackageVersion>1.1.0.0</PackageVersion>
<PackageVersion>1.1.1.0</PackageVersion>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) Dave Walker 2020, 2021, 2022, 2023</Copyright>
<Owners>Dave Walker</Owners>
Expand All @@ -16,7 +16,7 @@
<PackageProjectUrl>https://github.com/davewalker5/FlightRecorderDb</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<ReleaseVersion>1.1.0.0</ReleaseVersion>
<ReleaseVersion>1.1.1.0</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 3 additions & 8 deletions src/FlightRecorder.Entities/DataExchange/FlattenedAirport.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
using FlightRecorder.Entities.Db;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System;
using System.Diagnostics.CodeAnalysis;

namespace FlightRecorder.Entities.DataExchange
{
[ExcludeFromCodeCoverage]
public class FlattenedAirport
{
public const string CsvRecordPattern = @"^""[a-zA-Z]{3}"","".*"","".*""$";
Expand Down
4 changes: 2 additions & 2 deletions src/FlightRecorder.Entities/FlightRecorder.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageId>FlightRecorder.Entities</PackageId>
<PackageVersion>1.1.0.0</PackageVersion>
<PackageVersion>1.1.1.0</PackageVersion>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) Dave Walker 2020, 2021, 2022, 2023</Copyright>
<Owners>Dave Walker</Owners>
Expand All @@ -16,7 +16,7 @@
<PackageProjectUrl>https://github.com/davewalker5/FlightRecorderDb</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<ReleaseVersion>1.1.0.0</ReleaseVersion>
<ReleaseVersion>1.1.1.0</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions src/FlightRecorder.Manager/FlightRecorder.Manager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ReleaseVersion>1.1.0.0</ReleaseVersion>
<FileVersion>1.1.0.0</FileVersion>
<ProductVersion>1.1.0.0</ProductVersion>
<ReleaseVersion>1.1.1.0</ReleaseVersion>
<FileVersion>1.1.1.0</FileVersion>
<ProductVersion>1.1.1.0</ProductVersion>
<Configurations>Release;Debug</Configurations>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand Down
1 change: 0 additions & 1 deletion src/FlightRecorder.Manager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;

namespace FlightRecorder.Manager
{
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/FlightRecorder.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
<ReleaseVersion>1.1.0.0</ReleaseVersion>
<ReleaseVersion>1.1.1.0</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 9d1bb76

Please sign in to comment.