0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-12-25 23:40:50 +08:00
sqlpp11/docs/Database.md
2023-07-25 06:51:33 +02:00

871 B

Database Connectors

Using sqlpp11 requires of three logical parts:

  1. The actual tables of a database are represented structs, usually generated by sql2cpp. These structs contain compile-time information about each colum such as name and data type.
  2. The core library provides SQL as embedded language for C++. It allows you to write SQL statements for those tables and analyse results in a compile-time checked manner.
  3. The connector library that allows you to connect to an actual database, send queries and obtain results.

Three connector libraries are included in this repository:

  • MySQL / MariaDB
  • sqlite3 / SQLCipher
  • PostgreSQL

If you want to use other databases, you would have to write your own connector. Don't worry, it is not that hard.

The api is documented here.