Skip to content

Commit

Permalink
Merge pull request #263 from PxTools/fix/bump-sql-lib
Browse files Browse the repository at this point in the history
Upgraded PcAxis.Sql nuget to 1.2.5
  • Loading branch information
likp authored Dec 13, 2024
2 parents 414a70e + fe3989b commit b9438fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,15 @@ private static bool IsInteger(string value)
private Codelist? GetGrouping(string id, string language)
{
Codelist? codelist = null;
var cnmmOptions = _cnmmConfigurationService.GetConfiguration();

if (id.StartsWith("agg_", System.StringComparison.InvariantCultureIgnoreCase))
{
// Remove leading "agg_" from id
id = id.Substring(4);
}

PCAxis.Sql.Repositories.GroupingRepository repo = new PCAxis.Sql.Repositories.GroupingRepository(cnmmOptions.DatabaseID);
PCAxis.Sql.Models.Grouping grouping = repo.GetGrouping(id, language);
var util = new PCAxis.Sql.ApiUtils.ApiUtil();
PCAxis.Sql.Models.Grouping grouping = util.GetGrouping(id, language);

if (grouping != null)
{
Expand All @@ -235,16 +234,15 @@ private static bool IsInteger(string value)
private Codelist? GetValueset(string id, string language)
{
Codelist? codelist = null;
var cnmmOptions = _cnmmConfigurationService.GetConfiguration();

if (id.StartsWith("vs_", System.StringComparison.InvariantCultureIgnoreCase))
{
// Remove leading "vs_" from id
id = id.Substring(3);
}

PCAxis.Sql.Repositories.ValueSetRepository repo = new PCAxis.Sql.Repositories.ValueSetRepository(cnmmOptions.DatabaseID);
PCAxis.Sql.Models.ValueSet valueset = repo.GetValueSet(id, language);
var util = new PCAxis.Sql.ApiUtils.ApiUtil();
PCAxis.Sql.Models.ValueSet valueset = util.GetValueSet(id, language);

if (valueset != null)
{
Expand Down
2 changes: 1 addition & 1 deletion PxWeb/PxWeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="PCAxis.Menu.ConfigDatamodelMenu" Version="1.0.8" />
<PackageReference Include="PCAxis.Serializers" Version="1.3.1" />
<PackageReference Include="PcAxis.Sql" Version="1.2.4" />
<PackageReference Include="PcAxis.Sql" Version="1.2.5" />
<PackageReference Include="PxWeb.Api2.Server" Version="2.0.0-beta.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="7.2.0" />
Expand Down

0 comments on commit b9438fe

Please sign in to comment.