|
6 | 6 | [](https://github.com/pardnchiu/go-mysql-pool/blob/main/LICENSE) |
7 | 7 | [](https://github.com/pardnchiu/go-mysql-pool/releases) |
8 | 8 |
|
9 | | -## Key Features |
| 9 | +## Features |
10 | 10 |
|
11 | 11 | - **Read-Write Separation**: Support for independent read and write connection pool configurations to enhance database performance |
12 | 12 | - **Query Builder**: Fluent SQL query building interface to prevent SQL injection |
@@ -317,40 +317,6 @@ result, err := pool.Write.Exec("UPDATE users SET last_login = NOW() WHERE id = ? |
317 | 317 | lastID, err := builder.Upsert(insertData, updateData) |
318 | 318 | ``` |
319 | 319 |
|
320 | | -## Error Handling Strategy |
321 | | - |
322 | | -### Connection Management Errors |
323 | | -- Automatically re-establish connections when they fail |
324 | | -- Proper waiting and timeout handling when connection pool is exhausted |
325 | | -- Graceful degradation when database is unavailable |
326 | | - |
327 | | -### SQL Execution Errors |
328 | | -- Detailed error reporting for SQL syntax errors |
329 | | -- Clear messages for constraint violation errors |
330 | | -- Automatic cancellation of timeout queries |
331 | | - |
332 | | -### Concurrency Safety |
333 | | -- Thread-safe connection pool operations |
334 | | -- Concurrency-safe query builder design |
335 | | -- Proper locking mechanisms to prevent race conditions |
336 | | - |
337 | | -## Performance Features |
338 | | - |
339 | | -### Connection Pool Optimization |
340 | | -- Pre-established connections reduce creation overhead |
341 | | -- Connection reuse improves overall performance |
342 | | -- Automatic connection health checks |
343 | | - |
344 | | -### Query Optimization |
345 | | -- Prepared statement reuse mechanism |
346 | | -- Automatic slow query logging and analysis |
347 | | -- Query execution time monitoring |
348 | | - |
349 | | -### Memory Management |
350 | | -- Efficient query builder memory usage |
351 | | -- Automatic release of unused connections |
352 | | -- Streaming result set processing support |
353 | | - |
354 | 320 | ## License |
355 | 321 |
|
356 | 322 | This source code project is licensed under the [MIT](https://github.com/pardnchiu/go-mysql-pool/blob/main/LICENSE) License. |
|
0 commit comments