| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This project provides an LD_PRELOAD shared library that intercepts SQLite API calls and transparently redirects them to a PostgreSQL backend. It's designed to allow applications hard-coded for SQLite (like Plex Media Server) to utilize the scalability, concurrency, and features of PostgreSQL without modification.
Install System Dependencies:
sudo apt update
sudo apt install -y build-essential libsqlite3-dev libpq-dev pkg-configBuild the Project:
makeThis will compile the Rust engine and the C shared library.
Set the PG_CONNINFO environment variable to your PostgreSQL connection string and use LD_PRELOAD to launch your application.
# Using URI format (recommended)
export PG_CONNINFO="postgresql://user:password@localhost:5432/dbname"
# OR use standard Postgres environment variables
export PGHOST=localhost
export PGUSER=postgres
LD_PRELOAD=./sqlite_hook.so ./your_sqlite_applicationThe project includes both Rust unit tests and a comprehensive C integration test.
npm test
# OR
make test| Feature | Status |
|---|---|
| Basic Interception (LD_PRELOAD) | ✅ Done |
| Postgres Connectivity (libpq) | ✅ Done |
| Statement Lifecycle (prepare, step) | ✅ Done |
| Transaction Support (BEGIN/COMMIT) | ✅ Done |
| SQL Dialect Translation (UPSERT, etc.) | ✅ Done |
| Data Type Mapping (Blobs, Numerics) | ✅ Done |
| Parameter Binding (bind_*) | ✅ Done |
| Schema Discovery (PRAGMA table_info) | ✅ Done |
| Global Functions (strftime, rowid) | ✅ Done |
| Case Insensitivity (NOCASE) | ✅ Done |
| Error Code Mapping | ✅ Done |
| Back | FazBrowse Home | New Git URL |