docs: synchronize documentation across all languages
- Add mcp.md to: bg, fa, ru, tr, zh, ar - Add index.md to Bulgarian (bg) - Add 24 missing German (de) documentation files Translations for all supported languages now complete.
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
# Binärprotokoll API
|
||||
|
||||
Niedrigstufiges Wire-Protokoll für hochperformante Client-Verbindungen.
|
||||
|
||||
## Nachrichtenformat
|
||||
|
||||
Alle Nachrichten verwenden Big-Endian-Byte-Reihenfolge:
|
||||
|
||||
```
|
||||
┌────────┬────────┬────────┬────────┬─────────────┐
|
||||
│ Length │ Type │ Seq │ Status │ Payload │
|
||||
│ 4 bytes│ 1 byte │ 2 bytes│ 1 byte │ N bytes │
|
||||
└────────┴────────┴────────┴────────┴─────────────┘
|
||||
```
|
||||
|
||||
## Nachrichtentypen
|
||||
|
||||
### Query (0x01)
|
||||
|
||||
```nim
|
||||
let msg = makeQueryMessage(seq, "SELECT * FROM users")
|
||||
```
|
||||
|
||||
### Insert (0x02)
|
||||
|
||||
```nim
|
||||
let msg = makeInsertMessage(seq, "users", data)
|
||||
```
|
||||
|
||||
### Update (0x03)
|
||||
|
||||
```nim
|
||||
let msg = makeUpdateMessage(seq, "users", updates, where)
|
||||
```
|
||||
|
||||
### Delete (0x04)
|
||||
|
||||
```nim
|
||||
let msg = makeDeleteMessage(seq, "users", where)
|
||||
```
|
||||
|
||||
### Ready (0x05)
|
||||
|
||||
```nim
|
||||
let msg = makeReadyMessage(seq)
|
||||
```
|
||||
|
||||
### Error (0x06)
|
||||
|
||||
```nim
|
||||
let msg = makeErrorMessage(seq, code, message)
|
||||
```
|
||||
|
||||
## Antwortcodes
|
||||
|
||||
| Code | Name | Beschreibung |
|
||||
|------|------|-------------|
|
||||
| 0x00 | OK | Erfolg |
|
||||
| 0x01 | ERROR | Allgemeiner Fehler |
|
||||
| 0x02 | AUTH_REQUIRED | Authentifizierung erforderlich |
|
||||
| 0x03 | INVALID_QUERY | Abfragesyntaxfehler |
|
||||
| 0x04 | NOT_FOUND | Ressource nicht gefunden |
|
||||
|
||||
## Serialisierung
|
||||
|
||||
```nim
|
||||
import barabadb/protocol/wire
|
||||
|
||||
# Wert serialisieren
|
||||
let bytes = serializeValue(Value(kind: vkString, strVal: "test"))
|
||||
|
||||
# Wert deserialisieren
|
||||
let value = deserializeValue(bytes)
|
||||
```
|
||||
Reference in New Issue
Block a user