Skip to content

Commit

Permalink
chore: add field values
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar committed Nov 2, 2023
1 parent fe0c0e8 commit b46ab3e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions influxdb3/point.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ func (p *Point) SetIntegerField(name string, value int64) *Point {
return p

Check warning on line 151 in influxdb3/point.go

View check run for this annotation

Codecov / codecov/patch

influxdb3/point.go#L149-L151

Added lines #L149 - L151 were not covered by tests
}

// SetUIntegerField adds or replaces an unsigned integer field.
func (p *Point) SetUIntegerField(name string, value uint64) *Point {
p.Values.SetUIntegerField(name, value)
return p

Check warning on line 157 in influxdb3/point.go

View check run for this annotation

Codecov / codecov/patch

influxdb3/point.go#L155-L157

Added lines #L155 - L157 were not covered by tests
}

// GetStringField gets the string field value associated with the specified name.
// If the field is not present, returns nil.
func (p *Point) GetStringField(name string) *string {
Expand Down
6 changes: 6 additions & 0 deletions influxdb3/point_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ func (pv *PointValues) SetIntegerField(name string, value int64) *PointValues {
return pv

Check warning on line 140 in influxdb3/point_values.go

View check run for this annotation

Codecov / codecov/patch

influxdb3/point_values.go#L138-L140

Added lines #L138 - L140 were not covered by tests
}

// SetUIntegerField adds or replaces an unsigned integer field.
func (pv *PointValues) SetUIntegerField(name string, value uint64) *PointValues {
pv.Fields[name] = value
return pv

Check warning on line 146 in influxdb3/point_values.go

View check run for this annotation

Codecov / codecov/patch

influxdb3/point_values.go#L144-L146

Added lines #L144 - L146 were not covered by tests
}

// GetStringField gets the string field value associated with the specified name.
// If the field is not present, returns nil.
func (pv *PointValues) GetStringField(name string) *string {
Expand Down

0 comments on commit b46ab3e

Please sign in to comment.