C/C ++ProgramWhen you need to access the MySQL database, you can have two options: one is the pure MySQL c api, and the other is the mysqlplus library. The former is
Implemented by the MySQL Development TeamCodeYes MySQLSource code. The latter has now been convertedCommunityMaintained.
We can know from the name that the former is a pure c api, and all operations are implemented through the C function. The C ++ library encapsulates the concepts of connection, query, and result set.
Object-oriented style.
When working on the company's core program, I tend to use C API. In my opinion, c api is more efficient and WYSIWYG without any intermediate code. Everything needs you
Complete it by yourself. Debugging is easier.
When doing some additional gadgets, I gradually tend to be the latter, which makes the Code do not have the underlying interface of MySQL, which is simple and convenient to read, and the object-oriented style is more distinctive.