public void DoubleHashWillEmitSingleHash() { var sqlText = "\\#"; var result = SqlTextUtil.Parse(sqlText); Assert.Equal("#", result); }
public override Result VisitPlainText([NotNull] PlainTextContext context) { var sqlText = SqlTextUtil.Parse(context.GetToken(SQLText, 0).GetText()); var csharpText = SqlTextUtil.ToCSharpString(sqlText); _writer.WriteIndentLine($"sb.Append({csharpText});"); return(Result.Ok()); }
public override Result VisitPlainText([NotNull] PlainTextContext context) { var text = SqlTextUtil.Parse(context.GetToken(SQLText, 0).GetText()); _il.Emit(OpCodes.Ldloc_0); // sb _il.Emit(OpCodes.Ldstr, text); // sb str _il.Emit(OpCodes.Call, _appendCall); // [empty] return(Result.Ok()); }