Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/lsst.daf.butler/queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ filter query results based on that property of datasets.

Registry methods accepting user expressions also accept a ``bind`` parameter, which is a mapping from identifier name to its corresponding value.
Identifiers appearing in user expressions will be replaced with the corresponding value from this mapping.
Choose bind identifiers that are distinct and not the same as a dimension or dimension attribute name.

@timj timj Mar 3, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second half of this comment is only true if the dimension attribute is an integer or string and it gets promoted to be a dimension at some point in the future... Floating point attributes can't become dimensions. I realize it's easy to tell people never to do it though.

Using the ``bind`` parameter is encouraged when possible to simplify rendering of the query strings.
A partial example of comparing two approaches, without and with ``bind``:

Expand Down