Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR significantly expands the examples project by adding seven new examples covering ORMs (Dapper, linq2db), advanced features (retries/deduplication, compression), data types, troubleshooting (OpenTelemetry), and testing (Testcontainers). It also refactors the existing Insert_001_SimpleDataInsert example into structured methods and adds documentation improvements.
Changes:
- Seven new example files demonstrating ORM integration, OpenTelemetry tracing, Testcontainers, retries with Polly, compression settings, and simple data types
- Refactoring of
Insert_001_SimpleDataInsert.csto use structured methods with an additional EXCEPT clause example - Updates to supporting files (
Program.cs,README.md,.csproj) to integrate the new examples
Reviewed changes
Copilot reviewed 11 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/Troubleshooting_003_OpenTelemetryTracing.cs | New example demonstrating OpenTelemetry integration with the driver's ActivitySource |
| examples/Testing_001_Testcontainers.cs | New example showing how to use Testcontainers for integration testing |
| examples/README.md | Documentation updates listing all new examples and organizing them into sections |
| examples/Program.cs | Integration of new examples into the main execution flow with proper sectioning |
| examples/ORM_002_Linq2Db.cs | New example demonstrating linq2db ORM integration including LINQ queries and BulkCopy |
| examples/ORM_001_Dapper.cs | New example showing Dapper ORM usage with custom type handlers for ClickHouse types |
| examples/Insert_001_SimpleDataInsert.cs | Refactored into structured methods with new EXCEPT clause example |
| examples/DataTypes_001_SimpleTypes.cs | New example covering simple/scalar data types (integers, floats, decimals, booleans) |
| examples/ClickHouse.Driver.Examples.csproj | Added package references for new dependencies (Dapper, linq2db, OpenTelemetry, Polly, Testcontainers) |
| examples/Advanced_011_Compression.cs | New example explaining the UseCompression setting and when to modify it |
| examples/Advanced_010_RetriesAndDeduplication.cs | New example demonstrating retry patterns with Polly and ReplacingMergeTree for exactly-once semantics |
| @@ -0,0 +1,152 @@ | |||
| using System.Net; | |||
There was a problem hiding this comment.
Unused import in simple types example file
Low Severity
The using System.Net; import is not used anywhere in this file. The file demonstrates simple/scalar data types (integers, floats, decimals, booleans) and none of these require types from System.Net. IP address handling is covered in DataTypes_003_ComplexTypes.cs where this import would be appropriate.
Note
Introduces several new example categories and integrates them into the runner, plus expands insertion patterns and supporting docs/deps.
RetriesAndDeduplication(Polly +ReplacingMergeTreededup) andCompression(UseCompression behavior)SimpleTypesexample (ints, floats, decimals viaClickHouseDecimal, bool)DapperExample(incl.Dapper.Contribcaveats) andLinq2DbExample(LINQ queries, BulkCopy)OpenTelemetryTracingcollecting driver spans via ActivitySource with console exporterTestcontainersexample to spin up ephemeral ClickHouse for integration testsSimpleDataInsert(command reuse,ExecuteStatementAsync,EXCEPTclause with DEFAULTs); minor spacing fixes in other insert examples; adds raw stream CSV/JSON insert demo wiringProgram.csexecution order and documents them inREADME.mdClickHouse.Driver.Examples.csprojwith new package references (Dapper,Dapper.Contrib,linq2db,OpenTelemetry.Exporter.Console,Polly,Testcontainers.ClickHouse) and includes sample CSV as contentWritten by Cursor Bugbot for commit cb624eb. This will update automatically on new commits. Configure here.