document_client 0.0.4 copy "document_client: ^0.0.4" to clipboard
document_client: ^0.0.4 copied to clipboard

outdated

The DynamoDB document client simplifies working with items. It uses native Dart types as input parameters, as well as converts response data to native Dart types.

example/example.dart

import 'dart:convert';

import 'package:document_client/document_client.dart';

void main() async {
  final dc = DocumentClient(region: 'eu-west-1');

  final getResponse = await dc.get(
    tableName: 'MyTable',
    key: {'Car': 'DudeWheresMyCar'},
  );

  print(jsonEncode(getResponse.item));
  // e.g. { "wheels": 24, "units": "inch" }

  final batchGetResponse = await dc.batchGet(
    requestItems: {
      'Table-1': KeysAndProjection(
        keys: [
          {
            'HashKey': 'hashkey',
            'NumberRangeKey': 1,
          }
        ],
      ),
      'Table-2': KeysAndProjection(
        keys: [
          {
            'foo': 'bar',
          }
        ],
      ),
    },
  );

  print(jsonEncode(batchGetResponse.responses));
}
8
likes
0
pub points
57%
popularity

Publisher

verified publisheraws-dart.agilord.com

The DynamoDB document client simplifies working with items. It uses native Dart types as input parameters, as well as converts response data to native Dart types.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

aws_dynamodb_api, shared_aws_api

More

Packages that depend on document_client