Class: Atatus::Span::Context::Db Private

Inherits:
Object
  • Object
show all
Defined in:
lib/atatus/span/context/db.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance: nil, statement: nil, type: nil, user: nil, rows_affected: nil) ⇒ Db

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Db.



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/atatus/span/context/db.rb', line 25

def initialize(
  instance: nil,
  statement: nil,
  type: nil,
  user: nil,
  rows_affected: nil
)
  @instance = instance
  @statement = statement&.encode('utf-8', invalid: :replace, undef: :replace)
  @type = type
  @user = user
  @rows_affected = rows_affected
end

Instance Attribute Details

#instanceObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



39
40
41
# File 'lib/atatus/span/context/db.rb', line 39

def instance
  @instance
end

#rows_affectedObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



39
40
41
# File 'lib/atatus/span/context/db.rb', line 39

def rows_affected
  @rows_affected
end

#statementObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



39
40
41
# File 'lib/atatus/span/context/db.rb', line 39

def statement
  @statement
end

#typeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



39
40
41
# File 'lib/atatus/span/context/db.rb', line 39

def type
  @type
end

#userObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



39
40
41
# File 'lib/atatus/span/context/db.rb', line 39

def user
  @user
end