diff --git a/docs/Database.md b/docs/Database.md index 90b6abc8..e85aeb8c 100644 --- a/docs/Database.md +++ b/docs/Database.md @@ -1,11 +1,16 @@ -#Introduction -sqlpp11 is a library mainly for constructing queries and interpreting results. It does not know how to talk to a database on its own. It needs database connectors for that. Depending on the database you want to use, you can use an existing connector, for instance +# Introduction - * MySQL: https://github.com/rbock/sqlpp11-connector-mysql - * sqlite3: https://github.com/rbock/sqlpp11-connector-sqlite3 - * PostgreSQL: https://github.com/matthijs/sqlpp11-connector-postgresql - * STL Container (highly experimental): https://github.com/rbock/sqlpp11-connector-stl +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. -Or you have to write your own connector. Don't worry, it is not that hard. +Three connector libraries are included in this repository: -The api is documented [here](https://github.com/rbock/sqlpp11/blob/master/connector_api/connection.h). \ No newline at end of file + * MySQL / MariaBD + * 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).