Class: InfluxDB2::WriteApi::BatchItemKey

Inherits:
Object
  • Object
show all
Defined in:
lib/influxdb2/client/write_api.rb

Overview

Key for batch item

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket, org, precision = DEFAULT_WRITE_PRECISION) ⇒ BatchItemKey

Returns a new instance of BatchItemKey.



228
229
230
231
232
# File 'lib/influxdb2/client/write_api.rb', line 228

def initialize(bucket, org, precision = DEFAULT_WRITE_PRECISION)
  @bucket = bucket
  @org = org
  @precision = precision
end

Instance Attribute Details

#bucketObject (readonly)

Returns the value of attribute bucket.



233
234
235
# File 'lib/influxdb2/client/write_api.rb', line 233

def bucket
  @bucket
end

#orgObject (readonly)

Returns the value of attribute org.



233
234
235
# File 'lib/influxdb2/client/write_api.rb', line 233

def org
  @org
end

#precisionObject (readonly)

Returns the value of attribute precision.



233
234
235
# File 'lib/influxdb2/client/write_api.rb', line 233

def precision
  @precision
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



235
236
237
# File 'lib/influxdb2/client/write_api.rb', line 235

def ==(other)
  @bucket == other.bucket && @org == other.org && @precision == other.precision
end

#hashObject



241
242
243
# File 'lib/influxdb2/client/write_api.rb', line 241

def hash
  @bucket.hash ^ @org.hash ^ @precision.hash # XOR
end