TeiaLabs / redb

1 stars 0 forks source link

Properly handle containers #88

Closed jojo0severo closed 1 year ago

cardoso-neto commented 1 year ago

wingman:summarize

allai-devops-dev[bot] commented 1 year ago

Pull Request: Properly handle containers

Summary of changes:

  1. Separate default values into container and primitive values
    • Create DEFAULT_CONTAINER_VALUES dictionary for container types
    • Create DEFAULT_PRIMITIVE_VALUES dictionary for primitive types
    • Merge both dictionaries into DEFAULT_VALUES
  2. Update _get_value function to handle container types
    • Check if the field's outer type is a container type
    • If it is, wrap the value in the appropriate container type (list, set, or tuple)

Purpose: Improve handling of container types in the utility functions, ensuring correct default values are used for different data types.