DB::MetadataValueConverter
This module converts DB supported values to ::Log::Metadata::Value
Note to implementors
If the driver defines custom types to be used as arguments the default behavior
will be converting the value via #to_s. Otherwise you can define overloads to
change this behaviour.
module DB::MetadataValueConverter
def self.arg_to_log(arg : PG::Geo::Point)
::Log::Metadata::Value.new("(#{arg.x}, #{arg.y})::point")
end
end
Class methods
Returns arg encoded as a ::Log::Metadata::Value.
Returns arg encoded as a ::Log::Metadata::Value.
Returns arg encoded as a ::Log::Metadata::Value.