Skip to content

Commit

Permalink
Sqlite: Support translation of ToString
Browse files Browse the repository at this point in the history
  • Loading branch information
ralmsdeveloper committed Jan 4, 2020
1 parent f6505d1 commit d4e1e51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,16 @@ public class SqliteObjectToStringTranslator : IMethodCallTranslator
{
typeof(int),
typeof(long),
typeof(DateTime),
typeof(Guid),
typeof(byte),
typeof(byte[]),
typeof(double),
typeof(DateTimeOffset),
typeof(char),
typeof(short),
typeof(float),
typeof(decimal),
typeof(TimeSpan),
typeof(uint),
typeof(ushort),
typeof(ulong),
typeof(sbyte),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,16 @@ public override async Task Decimal_cast_to_double_works(bool async)
WHERE CAST(""p"".""UnitPrice"" AS REAL) > 100.0");
}

[ConditionalTheory(Skip = "Issue#17223")]
public override Task Like_with_non_string_column_using_ToString(bool async)
=> base.Like_with_non_string_column_using_ToString(async);
public override async Task Like_with_non_string_column_using_ToString(bool async)
{
await base.Like_with_non_string_column_using_ToString(async);

AssertSql(
@"SELECT ""o"".""OrderID"", ""o"".""CustomerID"", ""o"".""EmployeeID"", ""o"".""OrderDate""
FROM ""Orders"" AS ""o""
WHERE CAST(""o"".""OrderID"" AS TEXT) LIKE '%20%'");
}


private void AssertSql(params string[] expected)
=> Fixture.TestSqlLoggerFactory.AssertBaseline(expected);
Expand Down

0 comments on commit d4e1e51

Please sign in to comment.