Skip to content

Commit

Permalink
fixed args weren't stringified properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Puchaczov committed Sep 1, 2024
1 parent edadbe7 commit dcba9b3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Musoq.Evaluator.Tests/StringifyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class StringifyTests : BasicEntityTestBase
[DataRow("table Example {};")]
[DataRow("table Example { Id 'System.Int32' };")]
[DataRow("table Example { Id 'System.Int32', Name 'System.String' };")]
[DataRow("table Example { Id 'System.Int32', Name 'System.String' };\r\ncouple #a.b with table Example as SourceOfExamples;\r\nselect 1 from SourceOfExamples('a', 'b')")]

public void WhenToStringCalled_ShouldReturnSameQuery(string query)
{
Expand Down
2 changes: 1 addition & 1 deletion Musoq.Parser/Musoq.Parser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>3.0.7</Version>
<Version>3.0.8</Version>
<Authors>Jakub Puchała</Authors>
<Product>Musoq</Product>
<PackageProjectUrl>https://github.com/Puchaczov/Musoq</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion Musoq.Parser/Nodes/CoupleNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void Accept(IExpressionVisitor visitor)

public override string ToString()
{
return $"couple {SchemaMethodNode.ToString()} with table {TableName} as {MappedSchemaName}";
return $"couple {SchemaMethodNode.ToString()} with table {TableName} as {MappedSchemaName};";
}
}
}
4 changes: 2 additions & 2 deletions Musoq.Parser/Nodes/From/AliasedFromNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public override void Accept(IExpressionVisitor visitor)
public override string ToString()
{
if (!string.IsNullOrWhiteSpace(Alias))
return $"{Identifier}({Args}) as {Alias}";
return $"{Identifier}({Args.ToString()}) as {Alias}";

return $"{Identifier}({Args})";
return $"{Identifier}({Args.ToString()})";
}
}
}

0 comments on commit dcba9b3

Please sign in to comment.