Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 871 Bytes

Database.md

File metadata and controls

16 lines (11 loc) · 871 Bytes

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.