ZeeQL3Apache

master

Apache APR/mod_dbd adaptors for the ZeeQL Swift ORM
ZeeQL/ZeeQL3Apache

APR and Apache Database Adaptors for ZeeQL3

Apache 2 Swift4.2 Swift5 macOS tuxOS Travis

This library contains ZeeQL database adaptors based on the Apache Portable Runtime DBD module. APR DBD is kinda like a mini-ODBC/JDBC and has drivers for various databases. It supports prepared statements, transactions and some other stuff, but is, overall pretty limited. Note that you can also get the a handle to the native database library (e.g. libpq).

The primary advantage of APR DBD is that you can easily use it inside Apache using mod_swift and mod_dbd. Which gives you two big advantages:

  • Apache will manage the connection pool for you, even across language environments (e.g. you could write some pages in PHP)
  • The web admin can configure the database using regular Apache configuration mechanisms.

Note that while DBD abstracts the database client library, we still carry custom per-database adaptor subclasses. E.g. APRPostgreSQLAdaptor. This is to support database schema reflection, which varies between SQL databases.

Apache mod_dbd Adaptor

TODO

Installing APR DBD

Module Map

To use APR in Swift you need a proper CLang module map for it. Sample module maps are included.

macOS

The system APR DBD included in macOS is statically linked and only carries the SQLite3 driver. That is, you cannot use it to access a PostgreSQL database.

We suggest using Homebrew to get access to a full featured APR. To install APR with the PG and SQLite3 adaptor via Homebrew:

brew install apr-util --with-openldap --with-postgresql --with-sqlite

If you already installed APR (or Apache) before, you may need to use reinstall instead of install.

Note: you can also just compile APR from the sources, this has the advantage that you can debug the thing from within Xcode (i.e. step into the APR code).

Ubuntu / Debian

To install APR on Linux, do something like this:

sudo apt-get install libaprutil1-dbd-sqlite3 libaprutil1-dbd-pgsql

Documentation

ZeeQL Documentation can be found at: docs.zeeql.io.

Who

ZeeQL is brought to you by ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.

There is a #zeeql channel on the Noze.io Slack.

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

Last updated: Mon Mar 18 2024 11:48:16 GMT-0900 (Hawaii-Aleutian Daylight Time)