[CONCPP-23] SQLString class design has to be changed Created: 2020-07-14 Updated: 2020-07-20 Resolved: 2020-07-20 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C++ |
| Component/s: | General |
| Affects Version/s: | 0.9.2 |
| Fix Version/s: | 0.9.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lawrin Novitsky | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Currently SQLString wraps std::string - it's just have the property of that type, and even provides operators to get reference to the internal object. That is wrong in many ways. First, it's template class, and for application and connector it may be a different class. Also, std::string may have different size for release and debug version. What has to be done. 1) Operators exposing underlying std::string to applications has to be removed. Additional task will be to provide this access to the connector internally in some new way Some things to consider. Providing internally access to the string implementation can be organized in different ways, and maybe should be put as separate item here. Options are - some friend class, some class extending SQLString for internal use, use internally of StringImplementation or std::string itself, and corresponding constructor should probably avoid excessive data copying |
| Comments |
| Comment by Lawrin Novitsky [ 2020-07-20 ] |
|
The change has been pushed as part of the commit 1c9861e |