Skip to content

Commit f01a32b

Browse files
committed
Fix T-SQL Boolean literals.
1 parent 03dd489 commit f01a32b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AdoNet.Specification.Tests/Databases/MsSqlDatabaseBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class MsSqlDatabaseBase : DatabaseBase
66
{
77
// docker run --name mssql -e ACCEPT_EULA=Y -e MSSQL_SA_PASSWORD=Pa$$word -p 1433:1433 -d microsoft/mssql-server-linux:2017-latest
88
public override string ConnectionString => "data source=localhost;user id=sa;password=Pa$$word";
9-
public override string CreateBooleanLiteral(bool value) => value ? "1" : "0";
9+
public override string CreateBooleanLiteral(bool value) => $"cast({(value ? 1: 0)} as bit)";
1010
public override string CreateHexLiteral(byte[] value) => $"0x{BitConverter.ToString(value).Replace("-", "")}";
1111
}
1212
}

0 commit comments

Comments
 (0)