Comparison of MySQL C function interfaces and C ++ Interfaces

Source: Internet
Author: User

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.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.