Skip to content

Release 3.1 #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ version: 2
jobs:
build:
docker:
- image: mcr.microsoft.com/dotnet/sdk:6.0
- image: mcr.microsoft.com/dotnet/sdk:8.0
steps:
- checkout
- run: dotnet build ./Web/QueryTree.csproj -v n
test:
docker:
- image: mcr.microsoft.com/dotnet/sdk:6.0
- image: mcr.microsoft.com/dotnet/sdk:8.0
steps:
- checkout
- run: dotnet test ./Tests/Tests.csproj -v n
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 as builder
FROM mcr.microsoft.com/dotnet/sdk:8.0 as builder
WORKDIR /build
COPY . .
RUN dotnet restore
RUN dotnet publish --no-restore -c Release ./Web/QueryTree.csproj -o /dist

FROM mcr.microsoft.com/dotnet/aspnet:6.0 as runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0 as runtime
WORKDIR /app
COPY --from=builder /dist .
COPY --from=builder /build/Web/EmailTemplates ./EmailTemplates
Expand Down
6 changes: 3 additions & 3 deletions Engine/DataProcessorNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ internal override void FetchOrderedDependencies(IList<NodeBase> dependencies)
}

/// <summary>
/// Based on this node's inputs and settings, what columns will it
/// return, default implementation returns all the columns from its
/// Based on this node's inputs and settings, what columns will it
/// return, default implementation returns all the columns from its
/// first input
/// </summary>
/// <returns>The columns.</returns>
Expand All @@ -46,7 +46,7 @@ public override IList<string> GetColumns()
}

/// <summary>
/// Based on this node's inputs and settings, what will the types of
/// Based on this node's inputs and settings, what will the types of
/// its columns be
/// </summary>
/// <returns>The column types.</returns>
Expand Down
6 changes: 3 additions & 3 deletions Engine/DatabaseTableNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public override void UpdateSettings(Dictionary<string, object> settings)
}

/// <summary>
/// Special version of the GetColumnName for database tables, which
/// selects the actual table_name.column_name rather than the aliased
/// Special version of the GetColumnName for database tables, which
/// selects the actual table_name.column_name rather than the aliased
/// name(e.g.node_xxx.Column_x).
/// </summary>
/// <param name="colNumber">Col number.</param>
Expand Down Expand Up @@ -124,7 +124,7 @@ public string GetTableFrom()

public string GetDatabaseFrom()
{
return GetDatabaseTable(); // In most cases, bit after the FROM clause will just be 'FROM XXX', but joins may return 'FROM XXX JOIN YYY ON XXX.A = YYY.B';
return GetDatabaseTable(); // In most cases, bit after the FROM clause will just be 'FROM XXX', but joins may return 'FROM XXX JOIN YYY ON XXX.A = YYY.B';
}

public override string GetQuerySql()
Expand Down
26 changes: 13 additions & 13 deletions Engine/Engine.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="Interfaces\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions Engine/ExtractNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private string DatabaseLengthFunction()
else
{
return "LENGTH";
}
}
}

public override bool IsConfigured()
Expand All @@ -52,7 +52,7 @@ public override bool IsConfigured()
public override void UpdateSettings(Dictionary<string, object> settings)
{
base.UpdateSettings(settings);

if (settings.ContainsKey("InputColumnIndex"))
{
InputColumnIndex = Convert.ToInt32(settings["InputColumnIndex"]);
Expand All @@ -62,7 +62,7 @@ public override void UpdateSettings(Dictionary<string, object> settings)
{
StartType = (ExtractStartTypes)Enum.Parse(typeof(ExtractStartTypes), settings["StartType"].ToString());
}

if (settings.ContainsKey("StartPosition"))
{
StartPosition = Convert.ToInt32(settings["StartPosition"]);
Expand Down Expand Up @@ -93,7 +93,7 @@ public override void UpdateSettings(Dictionary<string, object> settings)
ResultColumnName = (string)settings["ResultColumnName"];
}
}

public override IList<string> GetColumns()
{
var baseCols = new List<string>();
Expand Down Expand Up @@ -279,7 +279,7 @@ public override string GetQuerySql()
newColumnDefinition,
GetColumns().Count - 1,
input1.GetDependencySql());

return sql;
}
}
Expand Down
6 changes: 3 additions & 3 deletions Engine/FilterNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace QueryTree.Engine
{
public enum FilterOperator
public enum FilterOperator
{
EqualTo,
DoesNotEqual,
Expand Down Expand Up @@ -337,13 +337,13 @@ public override string GetQuerySql()
{
compareValue = "LOWER(" + compareValue + ")";
}

if (DatabaseType == DatabaseType.PostgreSQL && IsBoolType(columnTypes[FilterColumnIndex.Value]))
{
compareValue = (new List<string>() { "1", "YES", "TRUE" }).Contains(compareValue.ToUpper()) ? "TRUE" : "FALSE";
}
}

switch (Operator)
{
case FilterOperator.EqualTo:
Expand Down
8 changes: 4 additions & 4 deletions Engine/GraphNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class GraphNode : DataProcessorNode
private string Values1;
private IList<int> DataSeriesColumnIndexes;
private string NodeType;

public override void UpdateSettings(Dictionary<string, object> settings)
{
base.UpdateSettings(settings);
Expand All @@ -19,7 +19,7 @@ public override void UpdateSettings(Dictionary<string, object> settings)
{
HorizontalAxis = (string)settings["HorizontalAxis"];
}

if (settings.ContainsKey("Values1"))
{
Values1 = (string)settings["Values1"];
Expand Down Expand Up @@ -63,7 +63,7 @@ public override IList<string> GetColumns()
}
}
}

return newCols;
}

Expand Down Expand Up @@ -105,7 +105,7 @@ public override string GetQuerySql()
{
SortColumnIndexes = new List<int>() { GetColumns().IndexOf(HorizontalAxis) };
}

var input1 = InputDict[Inputs[0]];
var input1Cols = input1.GetColumns();
var input1ColTypes = input1.GetColumnTypes();
Expand Down
10 changes: 5 additions & 5 deletions Engine/JoinNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum JoinType
FullOuter,
Cross
}

public class JoinNode : DataProcessorNode, ICollapsibleQueryNode
{
private JoinType JoinType;
Expand Down Expand Up @@ -163,15 +163,15 @@ public string GetRawColumnName(int colNumber)
else
{
return input2.GetColumnName(colNumber - input1.GetColumns().Count);
}
}
}
}

/// <summary>
/// Build the FROM xxx JOIN yyy ON xxx.col = yyy.col part of the JOIN
/// Build the FROM xxx JOIN yyy ON xxx.col = yyy.col part of the JOIN
/// query.
///
/// If the inputs are themselves data tables or other joins, collapses
///
/// If the inputs are themselves data tables or other joins, collapses
/// the query without using CTEs or inline views(in MySQL).
/// </summary>
/// <returns>The table from.</returns>
Expand Down
Loading