Querie.Parser (Querie v1.0.0) View Source

Link to this section Summary

Functions

cast value based on operator and schema field declaration if field is not define, skip it if field cast return skip then skip it too

Parse params and return

Link to this section Functions

Link to this function

cast_schema(schema, params)

View Source

cast value based on operator and schema field declaration if field is not define, skip it if field cast return skip then skip it too

Link to this function

parse(schema, raw_params)

View Source

Parse params and return

errors is a list of tuple [{field, message}]

Sample schema %{ inserted_at: :date, count: {:range, :integer}, is_active: :boolean, name: :string }

Link to this function

parse_with_schema(params, schema)

View Source