TypeConverters¶
Constants¶
Methods¶
- #convert_properties_to
Modifies a hash’s values to be of types acceptable to Neo4j or matching what the user defined using type in property definitions.
def convert_properties_to(obj, medium, properties) direction = medium == :ruby ? :to_ruby : :to_db properties.each_pair do |key, value| next if skip_conversion?(obj, key, value) properties[key] = convert_property(key, value, direction) end end
- #convert_property
Converts a single property from its current format to its db- or Ruby-expected output type.
def convert_property(key, value, direction) converted_property(primitive_type(key.to_sym), value, direction) end