Skip to content

Commit

Permalink
expose batch_size dql function
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed May 15, 2024
1 parent 8dfec99 commit 7631b55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions view/tags/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type (
Connector string
Limit *int
Match string
BatchSize int
}
)

Expand All @@ -33,6 +34,8 @@ func (t *Tag) updateView(key string, value string) error {
tag.Name = strings.TrimSpace(value)
case "match":
tag.Match = strings.TrimSpace(value)
case "batch":
tag.Match = strings.TrimSpace(value)
case "limit":
limit, err := strconv.Atoi(value)
if err != nil {
Expand Down Expand Up @@ -72,6 +75,9 @@ func (v *View) Tag() *tags.Tag {
appendNonEmpty(builder, "limit", strconv.Itoa(*v.Limit))
}
appendNonEmpty(builder, "table", v.Table)
if v.BatchSize > 0 {
appendNonEmpty(builder, "batch", strconv.Itoa(v.BatchSize))
}
appendNonEmpty(builder, "connector", v.Connector)
appendNonEmpty(builder, "match", v.Match)
if len(v.Parameters) > 0 {
Expand Down

0 comments on commit 7631b55

Please sign in to comment.