/// <summary> /// Execute SQL commands and return as data reader /// </summary> public Task <IBsonDataReader> ExecuteAsync(string command, BsonDocument parameters = null) { if (command == null) { throw new ArgumentNullException(nameof(command)); } var tokenizer = new Tokenizer(command); var sql = new SqlParser(_engine, tokenizer, parameters); return(sql.Execute()); }
/// <summary> /// Execute SQL commands and return as data reader. /// </summary> public IBsonDataReader Execute(TextReader commandReader, BsonDocument parameters = null) { if (commandReader == null) { throw new ArgumentNullException(nameof(commandReader)); } var tokenizer = new Tokenizer(commandReader); var sql = new SqlParser(_engine, tokenizer, parameters); var reader = sql.Execute(); return(reader); }