docs: add multi-language documentation (ru, fa, zh, tr, ar)

This commit is contained in:
2026-05-07 23:42:55 +03:00
parent abb382c419
commit e9d3c7e9de
157 changed files with 14339 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
# WebSocket API
用于实时数据流和推送通知的全双工流。
## 连接
```
ws://localhost:9471/ws
```
## 客户端示例
```javascript
const ws = new WebSocket('ws://localhost:9471/ws');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'query',
sql: 'SELECT * FROM users'
}));
};
ws.onmessage = (event) => {
console.log('Received:', JSON.parse(event.data));
};
```
## 消息格式
```json
{
"type": "query",
"id": "uuid",
"sql": "SELECT * FROM users"
}
```
## 消息类型
### 查询请求
```json
{
"type": "query",
"id": "123",
"sql": "SELECT * FROM users"
}
```
### 查询响应
```json
{
"type": "result",
"id": "123",
"data": [{"id": 1, "name": "Alice"}]
}
```
### 订阅
```json
{
"type": "subscribe",
"table": "users"
}
```