private static TableQueryGenerator GetQueryGeneratorFor(TableEntity table)
        {
            TableQueryGenerator queryGenerator;

            if (!tableQueryGenerators.TryGetValue(table.FullName, out queryGenerator))
            {
                queryGenerator = new TableQueryGenerator(table);
                tableQueryGenerators[table.FullName] = queryGenerator;
            }
            return(queryGenerator);
        }
        public void Consume(IEnumerable <DataRowEntity> rows, ValueStore valueStore)
        {
            if (_queryExecutor == null)
            {
                throw new ArgumentNullException("init must be called before consume");
            }

            foreach (var insertQuery in TableQueryGenerator.GenerateInsertStatements(rows, valueStore))
            {
                Dictionary <Guid, object> generatedValues = InsertWithResult(insertQuery);

                if (null != generatedValues)
                {
                    PutGeneratedValuesInValueStore(generatedValues, valueStore);
                }

                _reportInsertion();
            }
        }