Supported Ash Features

Copy Markdown View Source

This document describes which Ash features are supported by AshDynamo and how they map to DynamoDB operations.

Operations

CapabilityStatusNotes
:readQuery (with PK) or Scan fallback
:createPutItem with uniqueness check
:updateUpdateItem with existence check
:destroyDeleteItem with existence check
:selectProjectionExpression
:filterKeyCondition + FilterExpression + GSI index selection + Runtime fallback
:sortScanIndexForward (SK) + Runtime fallback
:limitDynamoDB Limit + LastEvaluatedKey/ExclusiveStartKey pagination

Filter Operators

KeyConditionExpression (partition key + sort key):

Ash OperatorDynamoDBWhere Used
===PK (required), SK
<<SK only
<=<=SK only
>>SK only
>=>=SK only

FilterExpression (non-key attributes, server-side filtering):

Ash OperatorDynamoDB
===
!=<>
<<
<=<=
>>
>=>=
containscontains

Runtime filter fallback (in-memory filtering):

Ash OperatorStatus
in⏳ Runtime filter
is_nil⏳ Runtime filter
or⏳ Runtime filter

Sort

DynamoDB natively supports sorting only by the sort key within a partition, controlled by the ScanIndexForward parameter.

Native sort (ScanIndexForward):

Used when ALL conditions are met:

  • Query mode (partition key filter present)
  • Sorting by a single field
  • That field is the sort key
DirectionScanIndexForward
:asctrue
:descfalse

Runtime sort fallback:

Used for all other cases:

  • Scan mode (no partition key filter)
  • Sorting by non-sort-key field
  • Multiple sort fields (even if sort key is included)

Not Implemented

FeatureNotes
:orVia filter expression
:upsertExplicit upsert mode
:aggregateVia Select: COUNT
begins_withSK prefix matching — requires custom Ash.Query.Function (no built-in Ash equivalent)
betweenSK range via BETWEEN — expressible as >= and <= but only first SK predicate is key-pushed
Bulk operationsBulk insert/update/delete
LSI index selectionLocal Secondary Index support
TransactionsVia TransactWriteItems

Not Supported

FeatureNotes
:offsetDynamoDB has no native offset mechanism
RelationshipsDynamoDB has no native joins