Improve temporal value filtering

This commit is contained in:
Denis Arh
2022-03-15 06:43:54 +01:00
parent e9dfe8254e
commit 640a90c20c
9 changed files with 115 additions and 8 deletions
+1
View File
@@ -94,6 +94,7 @@ func (svc record) Datasource(ctx context.Context, ld *report.LoadStepDefinition)
c = report.MakeColumnOfKind(k)
c.Name = f.Name
c.Label = f.Label
c.Options = f.Options
if c.Label == "" {
c.Label = c.Name
}
+9 -1
View File
@@ -392,7 +392,15 @@ func (f ModuleField) IsNumeric() bool {
}
func (f ModuleField) IsDateTime() bool {
return f.Kind == "DateTime"
return f.Kind == "DateTime" && !f.IsDateOnly() && !f.IsTimeOnly()
}
func (f ModuleField) IsDateOnly() bool {
return f.Kind == "DateTime" && f.Options.Bool("onlyDate")
}
func (f ModuleField) IsTimeOnly() bool {
return f.Kind == "DateTime" && f.Options.Bool("onlyTime")
}
// IsRef tells us if value of this field be a reference to something