Skip to content

Commit

Permalink
[doc] update dapper query description
Browse files Browse the repository at this point in the history
  • Loading branch information
shps951023 committed Dec 27, 2023
1 parent 8bf92ac commit dfabbf0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,9 @@ using (var connection = GetConnection(connectionString))
var rows = connection.Query(
new CommandDefinition(
@"select 'MiniExcel' as Column1,1 as Column2 union all select 'Github',2"
, CommandFlags.NoCache)
)
, flags: CommandFlags.NoCache)
);
// Note: QueryAsync will throw close connection exception
MiniExcel.SaveAs(path, rows);
}
```
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ using (var connection = GetConnection(connectionString))
new CommandDefinition(
@"select 'MiniExcel' as Column1,1 as Column2 union all select 'Github',2"
, flags: CommandFlags.NoCache)
)
);
MiniExcel.SaveAs(path, rows);
}
```
Expand Down
5 changes: 3 additions & 2 deletions README.zh-Hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,12 @@ using (var connection = GetConnection(connectionString))
var rows = connection.Query(
new CommandDefinition(
@"select 'MiniExcel' as Column1,1 as Column2 union all select 'Github',2"
, CommandFlags.NoCache)
)
, flags: CommandFlags.NoCache)
);
MiniExcel.SaveAs(path, rows);
}
```
上面的方法已知的問題:不能使用異步QueryAsync的方法,會報連接已經關閉的異常

以下寫法會將數據全載入內存

Expand Down

0 comments on commit dfabbf0

Please sign in to comment.