Home/Modules/connector

connector

library module lib/connector

Examples

lib/examples/connector

6 file(s)

<img align="right" src="https://github.com/mearvk/SLeeLa/blob/master/images/debian/debian-logo.png" width="75" height="75" alt="SLeeLa">

Native Database and Data-Source Connectors

This directory contains native C interfaces and C++17 facades for database and non-database sources. Each adapter is opt-in: its external client library must be installed, and network or database access begins only when the caller explicitly opens a connection or makes a request.

Group build

From the repository root, use:

If your current directory is lib/connector, the equivalent commands are make build, make database, make data, make test, make check-deps, and make clean. The build target is an alias for all.

Convenience entry points are sh lib/connector/build.sh all on Linux/macOS from the repository root, or build.bat all from a Windows command prompt while in lib/connector. Windows requires GNU Make (or MinGW Make), a configured C/C++ toolchain, and development headers/libraries for every selected connector; set connector-specific *_CFLAGS and *_LIBS variables when pkg-config metadata is unavailable. The Windows build has not yet been verified by the connector CI.

Individual connector builds

Commands in this table are run from the repository root.

ConnectorBuild commandExternal dependency
Registry and scoped propertiesmake -C lib/connector registryNone
MySQLmake -C lib/connector/mysql allmysqlclient or MariaDB Connector/C
MariaDB profilemake -C lib/connector/mariadb buildMariaDB Connector/C
SQLitemake -C lib/connector/sqlite buildSQLite
PostgreSQLmake -C lib/connector/postgres buildlibpq
Generic ODBCmake -C lib/connector/odbc buildODBC development package and configured driver
SQL Server profilemake -C lib/connector/sqlserver buildMicrosoft ODBC Driver + ODBC
Oracle profilemake -C lib/connector/oracle buildOracle ODBC driver + ODBC
CSV/TSVmake -C lib/connector/delimited buildNone
JSON tokenizermake -C lib/connector/json buildNone
XML validatormake -C lib/connector/xml buildlibxml2
HTTP/RESTmake -C lib/connector/rest buildlibcurl
MQTT clientmake -C lib/connector/mqtt buildEclipse Mosquitto client

The SQL Server and Oracle profiles reuse the shared ODBC implementation; they are not separate protocol implementations. Build each family independently if you do not need every optional third-party dependency.

Named connector registry

The shared registry supports deterministic references such as mysql, postgres, and sqlite, keeps properties scoped to each reference, rejects duplicate names, and rejects ambiguous unnamed lookup. It stores native connector handles as non-owning pointers; the caller remains responsible for opening and closing each connector.

API and security notes

Files 76