コード例 #1
0
        private object ExecuteScan(TranslationResult translationResult, Type entityType)
        {
            var scanConfig = new ScanOperationConfig
            {
                Filter         = translationResult.GetScanFilterForTable(this.TableDefinition),
                CollectResults = false
            };

            if (translationResult.AttributesToGet != null)
            {
                scanConfig.Select          = SelectValues.SpecificAttributes;
                scanConfig.AttributesToGet = translationResult.AttributesToGet;
            }

            var searchResult = this.TableDefinition.Scan(scanConfig);

            this.Log("DynamoDb scan: " + translationResult);

            return(this.CreateReader(searchResult, entityType, translationResult.ProjectionFunc));
        }
コード例 #2
0
        private Search ExecuteScan(TranslationResult translationResult, Type entityType)
        {
            var scanConfig = new ScanOperationConfig
            {
                Filter           = translationResult.GetScanFilterForTable(this.TableDefinition),
                CollectResults   = false,
                FilterExpression = translationResult.CustomizationHooks.CustomFilterExpression
            };

            if (translationResult.AttributesToGet != null)
            {
                scanConfig.Select          = SelectValues.SpecificAttributes;
                scanConfig.AttributesToGet = translationResult.AttributesToGet;
            }

            translationResult.CustomizationHooks.ConfigureScanOperationCallback?.Invoke(scanConfig);

            var searchResult = this.TableDefinition.Scan(scanConfig);

            this.Log("DynamoDb scan: {0}", translationResult);

            return(searchResult);
        }