Skip to content

Filtering naming conventions#2

Open
kalexieva wants to merge 3 commits intomainfrom
filtering
Open

Filtering naming conventions#2
kalexieva wants to merge 3 commits intomainfrom
filtering

Conversation

@kalexieva
Copy link
Collaborator

Change format from underscore (_) to camelCase. Add to naming conventions table. Use full words instead of abbreviations.

@kalexieva kalexieva force-pushed the main branch 3 times, most recently from d1f6609 to c79e583 Compare February 23, 2026 19:46
@kalexieva kalexieva force-pushed the filtering branch 2 times, most recently from 17e1c86 to d6822cc Compare February 23, 2026 20:22
…ventions table. Use full words instead of abbreviations.
Comment on lines 55 to 69
| Operator | Meaning | Example |
|----------------------|---------------------------------------------------------|----------------------------------|
| (none) | Equals (direct field name) | `status=ACTIVE` |
| `NotEqual` | Not equals | `statusNotEqual=CANCELLED` |
| `LessThan` | Strictly less than `<` | `priceLessThan=100` |
| `LessThanOrEqual` | Less than or equal `< =` | `priceLessThanOrEqual=100` |
| `GreaterThan` | Strictly greater than `>` | `priceGreaterThan=100` |
| `GreaterThanOrEqual` | Greater than or equal `> =` | `priceGreaterThanOrEqual=100` |
| `Maximum` | Upper bound (inclusive) `< =` | `capacityMaximum=500` |
| `Minimum` | Lower bound (inclusive) `> =` | `capacityMinimum=50` |
| `Before` | Timestamp strictly before `<` | `createdTimeBefore=2025-01-01` |
| `Latest` | Timestamp at or before `< =` | `createdTimeLatest=2025-01-01` |
| `After` | Timestamp strictly after `>` | `createdTimeAfter=2025-01-01` |
| `Earliest` | Timestamp at or after `> =` | `createdTimeEarliest=2025-01-01` |
| `has` (prefix) | [Nullability and existence](#nullability-and-existence) | `hasPhoneNumber=true` |

Choose a reason for hiding this comment

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

it is really confusing to organize this by "operator" because it's not obvious that there are multiple options for the same semantics. Also these aren't even operators, they are suffixes or prefixes. I think it would be much clearer to group by operation.

Additionally the name should read like English grammar. For some this requires using a prefix rather than a suffix. Here is my proposal:

Suggested change
| Operator | Meaning | Example |
|----------------------|---------------------------------------------------------|----------------------------------|
| (none) | Equals (direct field name) | `status=ACTIVE` |
| `NotEqual` | Not equals | `statusNotEqual=CANCELLED` |
| `LessThan` | Strictly less than `<` | `priceLessThan=100` |
| `LessThanOrEqual` | Less than or equal `< =` | `priceLessThanOrEqual=100` |
| `GreaterThan` | Strictly greater than `>` | `priceGreaterThan=100` |
| `GreaterThanOrEqual` | Greater than or equal `> =` | `priceGreaterThanOrEqual=100` |
| `Maximum` | Upper bound (inclusive) `< =` | `capacityMaximum=500` |
| `Minimum` | Lower bound (inclusive) `> =` | `capacityMinimum=50` |
| `Before` | Timestamp strictly before `<` | `createdTimeBefore=2025-01-01` |
| `Latest` | Timestamp at or before `< =` | `createdTimeLatest=2025-01-01` |
| `After` | Timestamp strictly after `>` | `createdTimeAfter=2025-01-01` |
| `Earliest` | Timestamp at or after `> =` | `createdTimeEarliest=2025-01-01` |
| `has` (prefix) | [Nullability and existence](#nullability-and-existence) | `hasPhoneNumber=true` |
| Filtering operation | Pattern | Example |
|---------------------------------------------------------|-----------------------------|---------------------------------|
| Equals | `{field}` | `status=ACTIVE` |
| Not equals | `{field}NotEqual` | `statusNotEqual=CANCELLED` |
| Lower bound (exclusive) `>` | `{field}GreaterThan` | `priceGreaterThan=100` |
| Lower bound (exclusive) `>` | `{field}After` | `createTimeAfter=2025-01-01` |
| Lower bound (inclusive) `>=` | `{field}GreaterThanOrEqual` | `priceGreaterThanOrEqual=100` |
| Lower bound (inclusive) `>=` | `min{Field}` | `minCapacity=50` |
| Lower bound (inclusive) `>=` | `minimum{Field}` | `minimumCapacity=50` |
| Lower bound (inclusive) `>=` | `earliest{Field}` | `earliestCreateTime=2025-01-01` |
| Upper bound (inclusive) `<=` | `{field}LessThanOrEqual` | `priceLessThanOrEqual=100` |
| Upper bound (inclusive) `<=` | `max{Field}` | `maxCapacity=500` |
| Upper bound (inclusive) `<=` | `maximum{Field}` | `maxiumuCapacity=500` |
| Upper bound (inclusive) `<=` | `latest{Field}` | `latestCreateTime=2025-01-01` |
| Upper bound (exclusive) `<` | `{field}LessThan` | `priceLessThan=100` |
| Upper bound (exclusive) `<` | `{field}Before` | `createTimeBefore=2025-01-01` |
| [Nullability and existence](#nullability-and-existence) | `has{Field}` | `hasPhoneNumber=true` |

or if <br/> renders correctly:

Suggested change
| Operator | Meaning | Example |
|----------------------|---------------------------------------------------------|----------------------------------|
| (none) | Equals (direct field name) | `status=ACTIVE` |
| `NotEqual` | Not equals | `statusNotEqual=CANCELLED` |
| `LessThan` | Strictly less than `<` | `priceLessThan=100` |
| `LessThanOrEqual` | Less than or equal `< =` | `priceLessThanOrEqual=100` |
| `GreaterThan` | Strictly greater than `>` | `priceGreaterThan=100` |
| `GreaterThanOrEqual` | Greater than or equal `> =` | `priceGreaterThanOrEqual=100` |
| `Maximum` | Upper bound (inclusive) `< =` | `capacityMaximum=500` |
| `Minimum` | Lower bound (inclusive) `> =` | `capacityMinimum=50` |
| `Before` | Timestamp strictly before `<` | `createdTimeBefore=2025-01-01` |
| `Latest` | Timestamp at or before `< =` | `createdTimeLatest=2025-01-01` |
| `After` | Timestamp strictly after `>` | `createdTimeAfter=2025-01-01` |
| `Earliest` | Timestamp at or after `> =` | `createdTimeEarliest=2025-01-01` |
| `has` (prefix) | [Nullability and existence](#nullability-and-existence) | `hasPhoneNumber=true` |
| Filtering operation | Pattern | Example |
|---------------------------------------------------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| Equals | `{field}` | `status=ACTIVE` |
| Not equals | `{field}NotEqual` | `statusNotEqual=CANCELLED` |
| Lower bound (exclusive) `>` | `{field}GreaterThan`<br/>`{field}After` | `priceGreaterThan=100`<br/>`createTimeAfter=2025-01-01` |
| Lower bound (inclusive) `>=` | `{field}GreaterThanOrEqual`<br/>`min{Field}`<br/>`minimum{Field}`<br/>`earliest{Field}` | `priceGreaterThanOrEqual=100`<br/>`minCapacity=50`<br/>`minimumCapacity=50`<br/>`earliestCreateTime=2025-01-01` |
| Upper bound (inclusive) `<=` | `{field}LessThanOrEqual`<br/>`max{Field}`<br/>`maximum{Field}`<br/>`latest{Field}` | `priceLessThanOrEqual=100`<br/>`maxCapacity=500`<br/>`maxiumuCapacity=500`<br/>`latestCreateTime=2025-01-01` |
| Upper bound (exclusive) `<` | `{field}LessThan`<br/>`{field}Before` | `priceLessThan=100`<br/>`createTimeBefore=2025-01-01` |
| [Nullability and existence](#nullability-and-existence) | `has{Field}` | `hasPhoneNumber=true` |

Copy link
Collaborator Author

@kalexieva kalexieva Feb 25, 2026

Choose a reason for hiding this comment

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

Ah, I see what you are going for, yeah, that looks good.

I changed minimum, maximum, earliest and latest to be prefixes.

I still think the timestamp specific fields should be separate rows though. To make it clear that after, before, earliest, and latest are to be used with timestamps specifically. So I kept those separate still, but merged the other rows like your suggestion.

image

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.

3 participants