Carbunql icon indicating copy to clipboard operation
Carbunql copied to clipboard

Using Source Generators for parsing sql at compile time

Open ElderJames opened this issue 1 year ago • 4 comments

As you know, this is to improve performance

[SelectQuery( @"
select a.column_1 as col1, a.column_2 as col2
from table_a as a
left join table_b as b on a.id = b.table_a_id
where b.table_a_id is null
")]
public partial SomeSql { 

}

FromClause from = SomeSql.FromClause!;
string sql = SomeSql .ToCommand().CommandText;

ElderJames avatar Aug 17 '23 04:08 ElderJames