1. MooseStack
  2. Data Types
  3. Network Types

On this page

IPv4IPv6Type Mapping ReferenceSee Also

IPAddress Types

ClickHouse provides native IP address types for efficient storage and querying.

IPv4

Stores IPv4 addresses in 4 bytes.

import { tags } from "typia"; interface NetworkEvent {  source_ip: string & tags.Format<"ipv4">;    // IPv4  client_ip: string & tags.Format<"ipv4">;    // IPv4}

IPv6

Stores IPv6 addresses in 16 bytes. Also handles IPv4-mapped IPv6 addresses.

import { tags } from "typia"; interface NetworkEvent {  dest_ip: string & tags.Format<"ipv6">;    // IPv6}

Type Mapping Reference

ClickHouse TypeTypeScriptPython
IPv4string & tags.Format<"ipv4">IPv4Address
IPv6string & tags.Format<"ipv6">IPv6Address
Why use native IP types?

Native IP types are more storage-efficient than strings and enable IP-specific functions like range queries, subnet matching, and CIDR operations directly in ClickHouse.

See Also

  • ClickHouse IPv4 — ClickHouse official documentation
  • ClickHouse IPv6 — ClickHouse official documentation
  • Overview
  • Quick Start
  • Templates / Examples
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Data Modeling
MooseStack in your App
  • App / API frameworks
Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs
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
  • Changelog
Contribution
  • Documentation
  • Framework
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackTemplates
Changelog
Source506