finds.dev← search

// the find

jieshiu/cdbl

C · Apache-2.0 · updated May 2017

CDBL is C library for accessing SQL databases (SQL Server, Postgre, MySQL, Oracle).

A thin C wrapper attempting to unify SQL Server, PostgreSQL, MySQL, and Oracle access behind one API, using bundled vendor libraries (libpq, FreeTDS-derived headers) for Windows builds. It's aimed at C developers who want a single connect/exec/fetch interface across databases without touching each vendor's native client library directly.

Uses cursor-style row iteration (cdbl_iseof/cdbl_next/cdbl_get_itemvalue_s) that will feel familiar to anyone who's used ODBC or DB-Library, so the API surface is easy to guess at. Supports parameterized queries via the szDBsql array pattern shown in the README, which at least gestures at avoiding string-concatenated SQL.

Zero stars, zero forks, last commit in 2017, and no CI or tests visible in the tree — there's no signal anyone but the author has ever run this against a real workload. It vendors precompiled Windows DLLs and .lib files directly into the repo (libpq.dll, dblib_dll.dll) instead of using a package manager or documenting a build process, which is a red flag for supply-chain hygiene and makes Linux/Mac builds unclear despite claiming Postgres support. The connection struct uses fixed-size char buffers with strcpy (szHost, szUsername, szPassword) with no visible bounds checking in the shown example, which is exactly the pattern that leads to buffer overflows in C. Error handling in the example is just "return 0 on failure," and the README gives no docs on the actual error codes, thread safety, or how MySQL/Oracle support (mentioned in the description) is even wired in since only Postgres and SQL Server headers appear in the tree.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →