Exemple #1
0
        public IReadOnlyList <IReadOnlyDictionary <string, IConvertible> > FetchLines(string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null)
        {
            using var scope = _logger.BeginScope("Query {Guid} of type {Type}", Guid.NewGuid(), nameof(FetchLines));

            var enumeratedParameters = parameters?.ToArray() ?? new KeyValuePair <string, IConvertible> [0];

            LogInputParameters(sql, enumeratedParameters);

            var lines = _logged.FetchLines(sql, enumeratedParameters);

            _logger.LogDebug("{Lines} returned", lines);
            return(lines);
        }
Exemple #2
0
 public IReadOnlyList <IReadOnlyDictionary <string, IConvertible> > ExecuteOnAdapter(ICommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null)
 => adapter.FetchLines(sql, parameters);
Exemple #3
0
        public IReadOnlyList <IConvertible> ExecuteOnAdapter(ICommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null)
        {
            var resultLines = adapter.FetchLines(sql, parameters);

            return(ParseResultLines(resultLines));
        }