示例#1
0
        public DynamoDbObjectQuery(Table table, EntityConverter converter, string indexName)
        {
            this.table     = table;
            this.converter = converter;
            var index = table.GlobalSecondaryIndexes[indexName];

            this.indexName = index.IndexName;
            hashKeyName    = index.KeySchema.SingleOrDefault(k => k.KeyType == KeyType.HASH)?.AttributeName;
            sortKeyName    = index.KeySchema.SingleOrDefault(k => k.KeyType == KeyType.RANGE)?.AttributeName;
            if (index.Projection.ProjectionType == ProjectionType.INCLUDE)
            {
                indexAttributes = index.Projection.NonKeyAttributes;
            }
        }
示例#2
0
 internal DynamoDbTable(AmazonDynamoDBClient client, Table table)
 {
     this.Table     = table;
     this.Converter = new EntityConverter(client, Table.TableName);
 }