Skip to content

Commit 71f2210

Browse files
add query comment
1 parent a5f67e2 commit 71f2210

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

QueryBuilder/Query.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@ public partial class Query : BaseQuery<Query>
99
public bool IsDistinct { get; set; } = false;
1010
public string QueryAlias { get; set; }
1111
public string Method { get; set; } = "select";
12+
public string QueryComment { get; set; }
1213

1314
public Query() : base()
1415
{
1516
}
1617

17-
public Query(string table) : base()
18+
public Query(string table, string comment = null) : base()
1819
{
1920
From(table);
21+
Comment(comment);
2022
}
2123

24+
2225
public bool HasOffset(string engineCode = null)
2326
{
2427
var limitOffset = this.GetOneComponent<LimitOffset>("limit", engineCode);
@@ -62,6 +65,12 @@ public Query As(string alias)
6265
return this;
6366
}
6467

68+
public Query Comment(string comment)
69+
{
70+
QueryComment = comment;
71+
return this;
72+
}
73+
6574
public Query For(string engine, Func<Query, Query> fn)
6675
{
6776
EngineScope = engine;

0 commit comments

Comments
 (0)