JsonSQL Code
Brought to you by:
teitge
| File | Date | Author | Commit |
|---|---|---|---|
| src | 2025-04-25 |
|
[974ade] Version 1.0.8 - Updates und Fixes |
| .gitattributes | 2025-04-24 |
|
[66ba8a] Add .gitattributes to exclude non-library files... |
| .gitignore | 2025-04-24 |
|
[52a42c] Füge .gitignore hinzu |
| CHANGELOG.md | 2025-04-24 |
|
[4391f9] Release 1.0.7 – Backup, Snackbar, Fahrzeug-Demo... |
| LICENSE | 2025-04-24 |
|
[58fc5f] Initial commit |
| LICENSE.html | 2025-04-14 |
|
[c93c5c] Initial commit with full project structure and ... |
| README.md | 2025-04-25 |
|
[349b9d] Aktualisierte README mit Komplett-Download-Link |
| _README.md | 2025-04-24 |
|
[ec3d53] Initial commit |
| __composer.json | 2025-04-25 |
|
[3de820] 🔧 Update: composer.json angepasst für Composer-... |
| composer.json | 2025-04-25 |
|
[15fdd5] Initial commit |
| index.php | 2025-04-14 |
|
[c93c5c] Initial commit with full project structure and ... |
JsonSQL ist eine moderne PHP-Bibliothek für SQL-ähnliche Abfragen auf JSON-Dateien.
Sie funktioniert komplett dateibasiert – ohne MySQL, SQLite oder Datenbankserver.
select, where, groupBy, join, …)Mit Composer installieren:
composer require teitge/jsonsql
Oder manuell einbinden:
require_once 'src/JsonSQL/JsonSQL.php';
use JsonSQL\JsonSQL;
$db = new JsonSQL([
'path' => __DIR__ . '/data',
'table' => 'users',
]);
$users = $db->select(['id', 'name'])
->where('age', '>=', 18)
->orderBy('name')
->get();
| Kategorie | Details |
|---|---|
| Datenquelle | JSON-Dateien je Tabelle |
| Abfragen | select, where, orderBy, groupBy, join, limit, offset |
| Systemlogik | autoincrement, autouuid, autohash, timestamps, Validierung |
| Verschlüsselung | Felder können automatisch ver- und entschlüsselt werden (encrypt) |
| Statistik | sum, avg, count, median, mode, stddev, variance, … |
| Transaktionen | transact(), commit() – sicher & verzögert schreiben |
| Import/Export | CSV & MySQL (CREATE/INSERT) aus .system.json generieren |
| Modularer Code | PSR-4, eigene Traits & Klassen je Bereich |
src/
├── JsonSQL.php // Hauptklasse
├── JS_Base.php // Gemeinsame Methoden
├── JS_Select.php // SELECT-Logik
├── JS_Insert.php // INSERT-Logik
├── JS_System.php // Automatische Felder, Validierung, Timestamps, ...
└── ...
| Typ | Bedeutung |
|---|---|
autoincrement |
Zählt IDs automatisch hoch |
autouuid |
Generiert UUIDs bei jedem Insert |
autohash |
Erzeugt Hash (z. B. md5, sha256) |
timestamp:create |
Zeitstempel bei Erstellung |
timestamp:update |
Zeitstempel bei Änderung |
encrypt / decrypt |
Feldinhalt verschlüsseln / entschlüsseln |
👉 Vollständige Demos findest du unter /examples/demos:
MIT – kostenlos & offen für private oder kommerzielle Nutzung.
Du hast Ideen, willst mithelfen oder Fehler melden?
→ Issues & Pull Requests sind willkommen!
Du kannst auch den vollständigen Download inklusive Demo von https://www.teitge.de/JsonSQL/JsonSQL.zip herunterladen.
© 2024–2025 JsonSQL Team
🔗 Projektseite: https://teitge.de
🔧 GitHub: https://github.com/johannes-teitge/JsonSQL