querybuilder
querybuilder copied to clipboard
Escaping ? doesn't work
I have a RAW sql that would pivot rows as columns and most of these have special characters for instance columns with period or questionmark dont work var query = new Query("dbo.Table"); query.Select("Column .."); produces SELECT [Column ].[].[] FROM [dbo].[Table] Using SelectRaw worked here but columns with question mark errors out since it's used to parameterize. var query = new Query("dbo.Table"); query.Select("Column ?");
Can these characters be escaped so that the sqlkata would ignore then?
I'm unable to override protected virtual string parameterPlaceholder { get; set; } = "?"; Due to magic string in CompileRaw method i.e ctx.RawSql = Helper.ExpandParameters(ctx.RawSql, "?", ctx.Bindings.ToArray());
@SitharaNA do you mind adding a failed test case as PR?