Skip to content

Commit

Permalink
docs(field): add additional comments for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
bartventer committed Feb 29, 2024
1 parent 37bde96 commit ea3ca18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions field/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ func (e expr) AddFieldPath(path docstore.FieldPath) expr {
return e
}

// Build implements Expr.
// Build returns the field path, operator, and value for the expression.
// If the expression is nil, it returns zero values for all three return types.
func (e expr) Build() (fieldPath docstore.FieldPath, op string, value interface{}) {
if e.e == nil {
return
}
return e.e.Build()
}

// ColumnName implements Expr.
// ColumnName returns the column name (same as the docstore tag name)
func (e expr) ColumnName() string {
return e.col.Name
}
Expand Down

0 comments on commit ea3ca18

Please sign in to comment.