Skip to content

Parse the where param for column mappings#16318

Merged
brandonkelly merged 2 commits into5.6from
feature/parse-where-param
Dec 11, 2024
Merged

Parse the where param for column mappings#16318
brandonkelly merged 2 commits into5.6from
feature/parse-where-param

Conversation

@brandonkelly
Copy link
Copy Markdown
Member

@brandonkelly brandonkelly commented Dec 11, 2024

Description

Parses element queries’ where params for column mappings (e.g. idelements.id, or fieldHandlefields’ value SQL), making things like this possible:

{% set entries = craft.entries()
  .section('news')
  .andWhere([
    'or',
    ['<', 'myNumberField', 100],
    ['>', 'myNumberField', 200],
  ])
  .andWhere("[[myTextField]] LIKE 'foo%'")
  .all() %}

@brandonkelly brandonkelly merged commit 335fa0f into 5.6 Dec 11, 2024
@brandonkelly brandonkelly deleted the feature/parse-where-param branch December 11, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant