/// <summary> /// Executes the specified SQL command text and binds the selected row to /// a dictionary from the columns names and values of the result. /// </summary> /// <param name="context">A SQL command context which includes a SELECT command.</param> /// <param name="columns">The columns to return. If null, all columns will be returned.</param> /// <returns>The result of the SQL command.</returns> internal IDictionary <string, object> ExecuteColumnKeyedDictionaryResult(IContext context, IEnumerable <string> columns) { var processor = new ColumnKeyedDictionaryResultProcessor(columns); return(RunCommand <IDictionary <string, object> >(context, processor)); }
/// <summary> /// Executes the specified SQL command text and bind the selected row to /// a dictionary from the columns names and values of the result. /// </summary> /// <param name="context">A SQL command context which includes a SELECT command.</param> /// <param name="columns">The columns to return. If null, all columns will be returned.</param> /// <param name="cancel">A token to monitor for cancellation requests.</param> /// <returns>The result of the SQL command.</returns> internal Task <IDictionary <string, object> > ExecuteColumnKeyedDictionaryResultAsync(IContext context, IEnumerable <string> columns, CancellationToken cancel) { var processor = new ColumnKeyedDictionaryResultProcessor(columns); return(RunCommandAsync <IDictionary <string, object> >(context, processor, cancel)); }