Update SmapleBy

This commit is contained in:
sunkaixuan 2024-05-14 11:05:59 +08:00
parent 18dc271d58
commit 783a230337
2 changed files with 13 additions and 1 deletions

View File

@ -1240,6 +1240,16 @@ namespace SqlSugar
string sql = "SAMPLE BY " + timeNumber + sampleBy.ToString().Substring(0, 1);
this.QueryBuilder.SampleBy = sql;
}
else if (timeType == SampleByUnit.Millisecond)
{
string sql = "SAMPLE BY " + timeNumber + " T ";
this.QueryBuilder.SampleBy = sql;
}
else if (timeType == SampleByUnit.Microsecond)
{
string sql = "SAMPLE BY " + timeNumber + " U ";
this.QueryBuilder.SampleBy = sql;
}
else
{
string sql = "SAMPLE BY "+timeNumber + sampleBy.ToString().Substring(0, 1).ToLower();

View File

@ -11,6 +11,8 @@ namespace SqlSugar
Hour,
Day,
Month,
Year
Year,
Millisecond,
Microsecond,
}
}