Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
indexer-alt: use
NULL
, instead of DEFAULT VALUE
## Description Add `#[diesel(treat_none_as_default_value = false)]` to model types that include optional fields. This affects how those fields are written out to SQL when they contain `None`. Previously (and by default), those fields would be represented by the keyword `DEFAULT VALUE`, and after this change, they will be represented by a parameter binding, which will be bound to `NULL`. This is semantically identical in our case, because we don't set default values, but it also results in less variety in prepared statements (because regardless of the content of fields, they will now all be represented by a binding), which will improve grouping of statistics per-statement, and could also improve performance, if those prepared statements can be cached and re-used. ## Test plan Re-run indexer on first 100000 checkpoints.
- Loading branch information