I'd like to approach this library by tackling some simple problems first to get a sense of how difficult the larger problems will be. First thing I'd like to do is translate expressions and constructs that have a relatively clear 1-to-1 mapping. For example:
A simple add function:
Should translate into the following SQL code:
create function [add](@x int, @y int)
returns int
as
begin
return(@x + @y)
end
An object based expression like so:
type BandMember = { Name:string; Position:string; DOB:System.DateTime }
let george = { Name="George Clinton"; Position="bandleader"; DOB=new System.DateTime(1941, 7, 22) }
Might translate to:
select 'George' As Name, 'bandleader' As Position, cast('7/22/1941' as datetime) As DOB
I'd like to approach this library by tackling some simple problems first to get a sense of how difficult the larger problems will be. First thing I'd like to do is translate expressions and constructs that have a relatively clear 1-to-1 mapping. For example:
A simple add function:
Should translate into the following SQL code:
An object based expression like so:
Might translate to: