Skip to content

Support compound_fields custom ecto type #517

@stanleygtrillion

Description

@stanleygtrillion

currently compound_fields automatically hardcode type to :string
but in the case of compound_fields of 2 uuid fields, performing filter to this compound_field will fail

e.g.

compound_fields: [
  new_uuid: [
    :uuid1,
    :uuid2,
  ]
],

with op like_or will generate uuid1 like $1 OR uuid2 like $1
this will fail because uuid operation with like throw error at postgres
e.g: select * from my_table where id like '<uuid value>';

is it possible to defined the ecto_type on compound_fields so on building the like_or operation it will generate uuid1 = $1 OR uuid2 = $2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions