Skip to content

Commit

Permalink
expose SetLimit on criterion
Browse files Browse the repository at this point in the history
  • Loading branch information
khezen committed Jul 14, 2020
1 parent aea8c41 commit 083ee30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sqlavro/criterion.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func (c *Criterion) limit(schema avro.Schema) (interface{}, error) {
}
}

func (c *Criterion) setLimitFromNative(limit interface{}) error {
// SetLimit - from native go
func (c *Criterion) SetLimit(limit interface{}) error {
if limit == nil {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion sqlavro/crtierion.factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewCriterionFromNative(field *avro.RecordFieldSchema, value interface{}, or
criterion.FieldName = field.Name
}
criterion.setSchema(*field)
err := criterion.setLimitFromNative(value)
err := criterion.SetLimit(value)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 083ee30

Please sign in to comment.