feat: wire protocol integration in TCP server

- Server now reads binary wire protocol messages (header + payload)
- Implements recvExact for reliable message framing
- Query execution against LSM-Tree for SELECT/INSERT/DELETE
- SELECT supports point reads (WHERE key = 'value') and full scans
- INSERT parses simple EdgeDB-style syntax
- DELETE with WHERE clause
- Wire protocol responses: Data, Complete, Error, Pong
- Export wire protocol read/write helpers for external use
- Add scanMemTable to LSMTree for full scans
- Add GEL/ to .gitignore
- All 214 tests pass
This commit is contained in:
2026-05-06 03:38:10 +03:00
parent 2a13066a0d
commit f8909f155c
4 changed files with 267 additions and 16 deletions
+8
View File
@@ -403,3 +403,11 @@ proc close*(db: var LSMTree) =
proc memTableSize*(db: LSMTree): int = db.memTable.len
proc sstableCount*(db: LSMTree): int = db.sstables.len
proc dir*(db: LSMTree): string = db.dir
proc scanMemTable*(db: LSMTree): seq[Entry] =
## Return all entries from memory (memTable + immutableMem)
result = @[]
for e in db.memTable.entries:
result.add(e)
for e in db.immutableMem.entries:
result.add(e)