File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,11 @@ namespace SqlKata
88{
99 public partial class Query : BaseQuery < Query >
1010 {
11+ private string comment ;
12+
1113 public bool IsDistinct { get ; set ; } = false ;
1214 public string QueryAlias { get ; set ; }
1315 public string Method { get ; set ; } = "select" ;
14- public string QueryComment { get ; set ; }
1516 public List < Include > Includes = new List < Include > ( ) ;
1617 public Dictionary < string , object > Variables = new Dictionary < string , object > ( ) ;
1718
@@ -25,6 +26,8 @@ public Query(string table, string comment = null) : base()
2526 Comment ( comment ) ;
2627 }
2728
29+ public string GetComment ( ) => comment ?? "" ;
30+
2831 public bool HasOffset ( string engineCode = null ) => GetOffset ( engineCode ) > 0 ;
2932
3033 public bool HasLimit ( string engineCode = null ) => GetLimit ( engineCode ) > 0 ;
@@ -63,9 +66,14 @@ public Query As(string alias)
6366 return this ;
6467 }
6568
69+ /// <summary>
70+ /// Sets a comment for the query.
71+ /// </summary>
72+ /// <param name="comment">The comment.</param>
73+ /// <returns></returns>
6674 public Query Comment ( string comment )
6775 {
68- QueryComment = comment ;
76+ this . comment = comment ;
6977 return this ;
7078 }
7179
You can’t perform that action at this time.
0 commit comments