sebastienros / yessql

A .NET document database working on any RDBMS
MIT License
1.17k stars 195 forks source link

BatchCommand.DefaultBuilderCapacity is not used #572

Open PiemP opened 4 weeks ago

PiemP commented 4 weeks ago

Good day to everyone.

Today I have initialized a new OrchardCore site and I have see this line in the logging file:

YesSql|The default capacity of the BatchCommand StringBuilder 10240 might not be sufficient. It can be increased with BatchCommand.DefaultBuilderCapacity to at least 41448

I have search about it but I don't find any information. This should be worry me?

Thank you

hishamco commented 3 weeks ago

https://github.com/sebastienros/yessql/blob/01fea28df4f091bd8c0904c6bf514c2ad7fdd663/src/YesSql.Core/Commands/BatchCommand.cs#L61

sebastienros commented 3 weeks ago

It's actually a useless warning because the DefaultBuilderCapacity constant is not even used. I believe it was intended for a StringBuilder but the current logic is just concatenating all the queries into a single one (~probably using an SB though~).

PiemP commented 3 weeks ago

Thank you guys,

I can close this question or you prefer that I leave it open?

sebastienros commented 3 weeks ago

I renamed it so we can leave it open

hishamco commented 3 weeks ago

Shall we remove this warning Seb?