There's nothing in ort that's specific to C or SQLite. This is simply what I currently use as output.
ort requires the newest library versions to operate: all of these tools are built in tandem.
Why is ort handy? It removes a lot of "boilerplate" code querying the database and allocating objects. Some additional features:
- Functions generated for modifying (updates), allocating (inserts), and accessing (queries).
- Automagic foreign key "INNER JOIN" when accessing structures. The configuration specifies nested structures and ort creates the "join" functionality when querying for those objects.
- Several types of accessors: iterator-based (function callback), list-based (queue), and unique (selecting on unique fields).
- Well-formed, readable C and SQL output describing functions (if applicable), variables, structures, and so on.
- "Difference calculator" between configuration files helps database updates be reasonable by providing the necessary "ALTER TABLE" and so on to help with versioning. (Also protects against accidental incompatible changes.)
- Beyond the usual native type support (int, text, real, blob), also supports "password" type that has automatic hashing mechanism built-in during selection from and insertion into the database.
- Several different types of SQL query (and update and delete) operators.
- Optional JSON output functions.
- Optional JSON input functions.
- Optional field validation (kcgi(3)) functions.
- Role-based access control enforced by process separation.
- Auditing of role-based access control.
See the TODO for what still needs to be done.
This repository mirrors the main repository on BSD.lv. ort is still under development!
ort runs best on OpenBSD, since this system offers the most comprehensive security. Why is this significant? With OpenBSD, processes may stipulate resource constraints effectively making them unable to change their running environment: for example, an application process may disable the facility to read files after spawning the database process. This effectively walls away the database from the application.
The sources generated by ort will also work on Linux, FreeBSD, and Mac OSX.
If your operating system doesn't already have ort bundled as a
third-party system, simply download and run the usual
doas make install.
All sources use the ISC (like OpenBSD) license. See the LICENSE.md file for details.