Documentation
¶
Overview ¶
Package item models DynamoDB items: the full AttributeValue type system (S, N, B, BOOL, NULL, M, L, SS, NS, BS) with DynamoDB's semantics — numbers are arbitrary-precision decimals compared numerically (never floats), sets reject duplicates, and item size follows the documented 400 KB accounting.
Index ¶
Constants ¶
const MaxItemSize = 400 << 10
MaxItemSize is DynamoDB's 400 KB item bound.
Variables ¶
var Zero = Decimal{}
Zero is the zero Decimal.
Functions ¶
func Equal ¶
Equal reports deep equality with DynamoDB semantics (numeric comparison for N/NS; set order irrelevant).
func ItemJSON ¶
func ItemJSON(it Item) json.RawMessage
ItemJSON renders a stored item back to the wire form.
Types ¶
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
Decimal is a normalized arbitrary-precision decimal.
func ParseDecimal ¶
ParseDecimal parses a DynamoDB wire number.
type Item ¶
Item is a stored item: attribute name → value.
func ItemFromJSON ¶
func ItemFromJSON(raw json.RawMessage) (Item, *awshttp.APIError)
ItemFromJSON decodes a wire item (map of AttributeValues).
type Value ¶
type Value struct {
Type Type
S string
N Decimal
B []byte
Bool bool
M map[string]Value
L []Value
SS []string
NS []Decimal
BS [][]byte
}
Value is one AttributeValue.
func FromJSON ¶
func FromJSON(raw json.RawMessage) (Value, *awshttp.APIError)
FromJSON decodes one wire-format AttributeValue: {"S":"x"}, {"N":"1.5"}, ...
func (Value) DebugString ¶
DebugString renders a compact human-readable form (admin/inspection).