0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 12:51:13 +08:00
sqlpp11/docs/Database.md

17 lines
871 B
Markdown
Raw Normal View History

2022-01-01 00:11:18 +08:00
# 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:
2023-07-25 12:51:33 +08:00
* 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](https://github.com/rbock/sqlpp11/blob/master/connector_api/connection.h).