fsprojects / Rezoom.SQL

Statically typechecks a common SQL dialect and translates it to various RDBMS backends
MIT License
669 stars 25 forks source link

add TypeProviderUser.TSQL.fsproj with a set of tests running on sql server #51

Open smoothdeveloper opened 5 years ago

smoothdeveloper commented 5 years ago

note that

[<Test>]
let ``test raw sql parameter`` () =
    let results =
        RawSQLQuery.Command(whereClause = [| sql "1="; arg 1 |]) |> runOnTestData
    for result in results do
        printfn "%A" result.Email

is failing due to this code being generated (apparently invalid TSQL):

use rzsql
declare @RZSQL_INLINE_0 int = 1
SELECT
[Users].[Created]
, [Users].[Email]
, [Users].[Id]
, [Users].[Name]
, [Users].[ProfilePictureSHA256]
, [Users].[RandomId]
FROM [Users]
WHERE ((1=@RZSQL_INLINE_0)<>0);