1. MooseStack
  2. Data Types
  3. Named Tuple Types

Named Tuple Types

Named tuples provide structured data with named fields, similar to lightweight nested objects.

Usage

import { ClickHouseNamedTuple } from "@514labs/moose-lib"; interface Point {  x: number;  y: number;} interface Shape {  center: Point & ClickHouseNamedTuple;    // Named tuple  radius: number;}

Arrays of Tuples

import { ClickHouseNamedTuple } from "@514labs/moose-lib"; interface Coordinate {  x: number;  y: number;} interface Path {  points: (Coordinate & ClickHouseNamedTuple)[];    // Array(Tuple(x Float64, y Float64))}
Tuples vs Nested

Named tuples are more lightweight than nested types and are stored inline. Use tuples for simple structures with a few fields; use nested types for more complex hierarchies.

See Also

  • Nested — For complex hierarchical structures
  • Arrays — Lists of values
  • ClickHouse Tuple — ClickHouse official documentation

On this page

UsageArrays of TuplesSee Also
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackTemplatesGuides
Release Notes
Source523
  • Overview
Build a New App
  • 5 Minute Quickstart
  • Browse Templates
  • Existing ClickHouse
Add to Existing App
  • Next.js
  • Fastify
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Data Modeling
Moose Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs & Web Apps
Deployment & Lifecycle
  • Moose Migrate
  • Moose Deploy
Reference
  • API Reference
  • Data Types
    • Strings
    • LowCardinality
    • Integers
    • Floats
    • Decimals
    • Booleans
    • Date & Time
    • Network
    • Arrays
    • Maps
    • Nested
    • Tuples
    • Enums
    • Geometry
    • JSON
    • Nullable
    • Aggregates
  • Table Engines
  • CLI
  • Configuration
  • Observability Metrics
  • Help
  • Release Notes
Contribution
  • Documentation
  • Framework
import { ClickHouseNamedTuple } from "@514labs/moose-lib"; interface Point {  x: number;  y: number;} interface Shape {  center: Point & ClickHouseNamedTuple;    // Named tuple  radius: number;}
import { ClickHouseNamedTuple } from "@514labs/moose-lib"; interface Coordinate {  x: number;  y: number;} interface Path {  points: (Coordinate & ClickHouseNamedTuple)[];    // Array(Tuple(x Float64, y Float64))}