Schottky encodes typed values and composite tuples so unsigned bytewise key order matches the declared value order.
- Caller-owned encoding and decoding buffers
- Allocation-free hot path when capacity is sufficient
- Independent ascending or descending order and null placement per field
- Literal complete-field prefixes for prefix filters and range scans
- Scalar and nested encodings for modern SQL data
- No third-party dependencies
- Optional Go 1.27 portable SIMD byte transforms
storage := make([]byte, 0, 128)
builder := schottky.NewBuilder(storage)
builder.Int64(42, schottky.AscNullsLast)
accountPrefix := builder.Len()
builder.String("Ada", schottky.DescNullsFirst)
key, err := builder.Key()
if err != nil {
return err
}
prefix := key[:accountPrefix]Builder never grows storage. Insufficient capacity returns schottky.ErrShortBuffer without partially appending a field.
Start with the key layout, Go API, SQL type map, format compatibility guide, and utf8mb4 collation map.
Enable the experimental SIMD path with GOEXPERIMENT=simd on Go 1.27. Scalar and SIMD builds emit identical keys.