Database connectors
June 22, 2025 ยท View on GitHub
Database connectors
Database connector classes connect your SQL code with the respective database backend.
They also make sure that statements are serialized in a way that the database comprehends. For instance,
foo.textN.is_distinct_from(std::nullptr);
will be serialized in different fashions depending on the connector you are using:
// mysql:
"NOT (tab_foo.id <=> NULL)"
// postgresql:
"tab_foo.id IS DISTINCT FROM NULL"
// sqlite3:
"tab_foo.id IS NOT NULL"
See the links below for details:
Connectors provided by sqlpp23
Other connectors
If you want to use other databases, you would have to write your own connector. Don't worry, it is not that hard, following the existing examples.