Skip to main content

Module index_composite

Module index_composite 

Source

Functionsยง

composite_index_basic
Basic composite index: model-level #[index(field_a, field_b)] creates a two-column index on SQL and a GSI (hash + range key) on DynamoDB.
composite_index_max_attributes
Maximum attribute boundary: #[index(partition = [f1, f2, f3, f4], local = [f5, f6, f7, f8])] (DDB-only).
composite_index_multi_hash
Multi-attribute partition key: #[index(partition = [a, b], local = [c])] creates a GSI with 2 HASH + 1 RANGE attributes (DDB-only).
composite_index_multi_range
Multi-attribute sort key: #[index(partition = [a], local = [b, c])] creates a GSI with 1 HASH + 2 RANGE attributes (DDB-only).
composite_index_multiple_indexes
Multiple indexes on the same model: verifies the query planner selects the correct index when a model defines two #[index] attributes (cross-driver).
composite_index_prefix_queries
Two-column index generates prefix query methods for each valid column prefix (cross-driver).
composite_index_simple_three_column_ddb
Three-column simple-mode index on DynamoDB: #[index(country, city, zip_code)] (DDB-only).
composite_index_sort_key_range_filter
Range filter chained onto a composite index partition query (cross-driver).
composite_index_struct_level
Struct-level #[index(field)] is equivalent to field-level #[index] (cross-driver).
composite_index_three_columns
Three-column composite index on SQL: #[index(country, city, zip_code)] (SQL-only).
composite_index_too_many_range_columns
Error condition: more than 4 RANGE columns in simple-mode index (DDB-only).