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
8
8
{
9
9
public partial class Query : BaseQuery < Query >
10
10
{
11
+ private string comment ;
12
+
11
13
public bool IsDistinct { get ; set ; } = false ;
12
14
public string QueryAlias { get ; set ; }
13
15
public string Method { get ; set ; } = "select" ;
14
- public string QueryComment { get ; set ; }
15
16
public List < Include > Includes = new List < Include > ( ) ;
16
17
public Dictionary < string , object > Variables = new Dictionary < string , object > ( ) ;
17
18
@@ -25,6 +26,8 @@ public Query(string table, string comment = null) : base()
25
26
Comment ( comment ) ;
26
27
}
27
28
29
+ public string GetComment ( ) => comment ?? "" ;
30
+
28
31
public bool HasOffset ( string engineCode = null ) => GetOffset ( engineCode ) > 0 ;
29
32
30
33
public bool HasLimit ( string engineCode = null ) => GetLimit ( engineCode ) > 0 ;
@@ -63,9 +66,14 @@ public Query As(string alias)
63
66
return this ;
64
67
}
65
68
69
+ /// <summary>
70
+ /// Sets a comment for the query.
71
+ /// </summary>
72
+ /// <param name="comment">The comment.</param>
73
+ /// <returns></returns>
66
74
public Query Comment ( string comment )
67
75
{
68
- QueryComment = comment ;
76
+ this . comment = comment ;
69
77
return this ;
70
78
}
71
79
You can’t perform that action at this time.
0 commit comments