c55d3080cf
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
Documentation updates: - Fix v0.1.0 → v1.1.0 version numbers in en, ru, fa, zh docs - Add missing Window Functions, Multi-Tenant ERP, Supported Keywords sections to ru, fa, zh baraql.md (~105 lines each) - Expand Turkish and Arabic baraql.md (110 → 268 lines) - Expand Turkish and Arabic installation.md (62 → 307 lines) - Add new Bulgarian documentation files (18 new files) Client updates: - Python: Full async/await rewrite with asyncio, request queueing - Rust: Full async/await rewrite with tokio, async examples - Nim: Update README to v1.1.0 - All clients now support async patterns consistently
59 lines
1.2 KiB
Markdown
59 lines
1.2 KiB
Markdown
# Колонково Съхранение (Columnar)
|
|
|
|
Колонково-ориентирано съхранение за аналитични заявки и агрегации.
|
|
|
|
## Употреба
|
|
|
|
```nim
|
|
import barabadb/core/columnar
|
|
|
|
var batch = newColumnBatch()
|
|
var ageCol = batch.addInt64Col("age")
|
|
var nameCol = batch.addStringCol("name")
|
|
|
|
ageCol.appendInt64(25)
|
|
nameCol.appendString("Alice")
|
|
```
|
|
|
|
## Агрегации
|
|
|
|
```nim
|
|
echo ageCol.sumInt64()
|
|
echo ageCol.avgInt64()
|
|
echo ageCol.minInt64()
|
|
echo ageCol.maxInt64()
|
|
echo ageCol.count()
|
|
```
|
|
|
|
## Кодиране
|
|
|
|
### RLE (Run-Length Encoding)
|
|
|
|
```nim
|
|
let rle = rleEncode(@[1'i64, 1, 1, 2, 2, 3])
|
|
```
|
|
|
|
### Dictionary Encoding
|
|
|
|
```nim
|
|
let dict = dictEncode(@["apple", "banana", "apple"])
|
|
```
|
|
|
|
## Типове Колони
|
|
|
|
| Тип | Описание |
|
|
|------|----------|
|
|
| `int32` | 32-битов integer |
|
|
| `int64` | 64-битов integer |
|
|
| `float32` | 32-битов float |
|
|
| `float64` | 64-битов float |
|
|
| `string` | Низ с променлива дължина |
|
|
| `bool` | Булев |
|
|
|
|
## Случаи на Употреба
|
|
|
|
- OLAP натоварвания
|
|
- Мащабни агрегации
|
|
- Data warehousing
|
|
- Анализ на времеви редове
|