{"id":48540596,"url":"https://github.com/ndxdeveloper/ndxsqlite","last_synced_at":"2026-04-08T04:02:48.541Z","repository":{"id":334699720,"uuid":"1142363922","full_name":"NDXDeveloper/NDXSQLite","owner":"NDXDeveloper","description":"Thread-safe SQLite wrapper for Free Pascal/Lazarus featuring connection pooling, AES-256 encryption (SQLCipher), schema migrations, async operations, and full TDataSet compatibility. Cross-platform: Linux, Windows, macOS. ","archived":false,"fork":false,"pushed_at":"2026-01-26T18:08:40.000Z","size":1617,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T00:35:06.706Z","etag":null,"topics":["connection-pool","cross-platform","database","encryption","freepascal","lazarus","pascal","sqlcipher","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NDXDeveloper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-26T10:06:24.000Z","updated_at":"2026-01-26T18:47:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/NDXDeveloper/NDXSQLite","commit_stats":null,"previous_names":["ndxdeveloper/ndxsqlite"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/NDXDeveloper/NDXSQLite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDXDeveloper%2FNDXSQLite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDXDeveloper%2FNDXSQLite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDXDeveloper%2FNDXSQLite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDXDeveloper%2FNDXSQLite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NDXDeveloper","download_url":"https://codeload.github.com/NDXDeveloper/NDXSQLite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDXDeveloper%2FNDXSQLite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31539230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["connection-pool","cross-platform","database","encryption","freepascal","lazarus","pascal","sqlcipher","sqlite","sqlite3"],"created_at":"2026-04-08T04:02:36.820Z","updated_at":"2026-04-08T04:02:48.533Z","avatar_url":"https://github.com/NDXDeveloper.png","language":"Pascal","readme":"# NDXSQLite\r\n\r\n**Professional SQLite Library for Free Pascal/Lazarus**\r\n\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\r\n[![Free Pascal](https://img.shields.io/badge/Free%20Pascal-3.2%2B-orange.svg)](https://www.freepascal.org/)\r\n[![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20Windows%20%7C%20macOS-lightgrey.svg)]()\r\n\r\n---\r\n\r\n## Overview\r\n\r\nNDXSQLite is a modern, thread-safe SQLite wrapper for Free Pascal and Lazarus. It provides a clean, object-oriented API for database operations with support for advanced features like connection pooling, schema migrations, and transparent encryption via SQLCipher.\r\n\r\n### Key Features\r\n\r\n- **Native SQLite API** - Direct bindings without SQLDB dependency\r\n- **Thread-Safe** - Full thread safety with connection pooling\r\n- **SQLCipher Support** - Transparent AES-256 database encryption\r\n- **Schema Migrations** - Version-controlled database schema evolution\r\n- **Cross-Platform** - Linux, Windows, and macOS support\r\n- **TDataSet Compatible** - Works with Lazarus DB-aware controls\r\n- **Comprehensive** - 148 working examples covering all features\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n### Installation\r\n\r\n1. Clone or download the repository\r\n2. Add the source paths to your project:\r\n   ```\r\n   -Fu/path/to/src-NDXSQLite/src\r\n   -Fu/path/to/src-NDXSQLite/src/core\r\n   -Fu/path/to/src-NDXSQLite/src/api\r\n   ```\r\n\r\n### Basic Usage\r\n\r\n```pascal\r\nprogram QuickDemo;\r\n\r\n{$mode objfpc}{$H+}\r\n\r\nuses\r\n  ndxsqliteconnection, ndxsqliteconnectionoptions;\r\n\r\nvar\r\n  Options: TNDXSQLiteConnectionOptions;\r\n  Conn: TNDXSQLiteConnection;\r\nbegin\r\n  Options := TNDXSQLiteConnectionOptions.Create;\r\n  try\r\n    Options.DatabasePath := 'myapp.db';\r\n    Options.JournalMode := jmWAL;\r\n\r\n    Conn := TNDXSQLiteConnection.Create(Options);\r\n    try\r\n      Conn.Open;\r\n\r\n      // Create table\r\n      Conn.ExecuteNonQuery(\r\n        'CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT)');\r\n\r\n      // Insert with parameters\r\n      Conn.ExecuteNonQuery(\r\n        'INSERT INTO users (name) VALUES (?)', ['Alice']);\r\n\r\n      // Query\r\n      WriteLn('Total: ', Conn.ExecuteScalar('SELECT COUNT(*) FROM users'));\r\n\r\n      Conn.Close;\r\n    finally\r\n      Conn.Free;\r\n    end;\r\n  finally\r\n    Options.Free;\r\n  end;\r\nend.\r\n```\r\n\r\n### With Encryption (SQLCipher)\r\n\r\n```pascal\r\nOptions.DatabasePath := 'secure.db';\r\nOptions.EncryptionKey := 'my-secret-key';  // AES-256 encryption\r\n```\r\n\r\n---\r\n\r\n## Features\r\n\r\n### Core\r\n| Feature | Description |\r\n|---------|-------------|\r\n| Connection Management | Auto-close timeout, connection states, action logging |\r\n| Transactions | Deferred, Immediate, Exclusive modes with savepoints |\r\n| Query Execution | ExecuteNonQuery, ExecuteScalar, ExecuteQuery with parameters |\r\n| PRAGMA Support | Journal mode, sync mode, cache size, foreign keys, etc. |\r\n\r\n### Advanced\r\n| Feature | Description |\r\n|---------|-------------|\r\n| Connection Pool | Thread-safe pooling with statistics |\r\n| Schema Migrations | Version tracking, up/down migrations |\r\n| Online Backup | Progress reporting, integrity verification |\r\n| Incremental BLOB I/O | Stream-based large binary handling |\r\n| Full-Text Search | FTS5 helper functions |\r\n| JSON Support | JSON extraction and manipulation |\r\n| Virtual Tables | Custom virtual table framework |\r\n\r\n### Platform Support\r\n| Platform | Architecture | Status |\r\n|----------|--------------|--------|\r\n| Linux | x86_64, aarch64 | Supported |\r\n| Windows | x86, x64 | Supported |\r\n| macOS | Intel, Apple Silicon | Supported |\r\n| Snap | x86_64 | Supported |\r\n| Flatpak | x86_64 | Supported |\r\n\r\n---\r\n\r\n## Documentation\r\n\r\n| Document | Description |\r\n|----------|-------------|\r\n| [Quick Start Guide](docs/QUICKSTART.md) | Installation and first program |\r\n| [API Reference](docs/API.md) | Complete class and method documentation |\r\n| [Changelog](docs/CHANGELOG.md) | Version history |\r\n| [Building](BUILDING.md) | Compilation instructions |\r\n| [Table of Contents](TOC.md) | Full documentation index |\r\n\r\n---\r\n\r\n## Examples\r\n\r\nThe `examples/console/` directory contains 148 working examples:\r\n\r\n```\r\n01_BasicConnection     - Simple connection and queries\r\n02_Transactions        - Transaction handling\r\n08_ConnectionPool      - Thread-safe connection pooling\r\n11_BackupRestore       - Online database backup\r\n14_Migrations          - Schema version control\r\n43_EncryptedDatabase   - SQLCipher encryption\r\n148_SQLCipherEncryption - Advanced encryption scenarios\r\n```\r\n\r\nRun an example:\r\n```bash\r\ncd examples/console/01_BasicConnection\r\nfpc -Fu../../../src BasicConnection.lpr\r\n./BasicConnection\r\n```\r\n\r\n---\r\n\r\n## Requirements\r\n\r\n- **Compiler:** Free Pascal 3.2.0 or later\r\n- **IDE:** Lazarus 2.0+ (optional)\r\n- **SQLite:** Automatically detected from system paths\r\n- **SQLCipher:** Optional, for encryption support\r\n\r\n---\r\n\r\n## Project Structure\r\n\r\n```\r\nsrc-NDXSQLite/\r\n├── src/                    # Source code\r\n│   ├── core/               # Connection, options, types\r\n│   ├── api/                # SQLite3 API bindings\r\n│   ├── advanced/           # Backup, migrations, BLOB, etc.\r\n│   ├── pool/               # Connection pooling\r\n│   └── ...\r\n├── tests/                  # Test suites\r\n├── examples/               # Working examples\r\n├── docs/                   # Documentation\r\n└── .github/workflows/      # CI/CD configuration\r\n```\r\n\r\n---\r\n\r\n## Contributing\r\n\r\nContributions are welcome. Please ensure:\r\n\r\n1. Code compiles without warnings\r\n2. Tests pass\r\n3. Examples work correctly\r\n4. Documentation is updated\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT License - See [LICENSE](LICENSE) for details.\r\n\r\n---\r\n\r\n## Author\r\n\r\n**Nicolas DEOUX**   \r\n\r\n- 📧 [NDXDev@gmail.com](mailto:NDXDev@gmail.com)  \r\n- 💼 [LinkedIn](https://www.linkedin.com/in/nicolas-deoux-ab295980/)  \r\n- 🐙 [GitHub](https://github.com/NDXDeveloper)  \r\n\r\n\r\n---\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n\r\n[![Star on GitHub](https://img.shields.io/github/stars/NDXDeveloper/NDXSQLite?style=social)](https://github.com/NDXDeveloper/NDXSQLite)\r\n[![Follow](https://img.shields.io/github/followers/NDXDeveloper?style=social)](https://github.com/NDXDeveloper)\r\n\r\n**[⬆ Back to top](#ndxsqlite)**\r\n\r\n*Last updated: January 2026 | SQLite 3.45.0+*\r\n\r\n\u003c/div\u003e\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndxdeveloper%2Fndxsqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndxdeveloper%2Fndxsqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndxdeveloper%2Fndxsqlite/lists"}