Introduction

hypequery is a TypeScript SDK for building type-safe dashboards and analytics applications with ClickHouse.

Why hypequery?

Working with ClickHouse in typeScript applications is currently challenging:

  • Raw SQL strings lack type safety and IDE support
  • Manual type definitions for queries and results are tedious to maintain
  • Building interactive dashboards requires complex query management
  • Processing large result sets efficiently is difficult

hypequery solves these problems by providing a fully type-safe query builder specifically designed for ClickHouse, with features tailored to building modern analytics applications.

Key Features

Complete Type Safety

Every part of your query is type-checked, from table and column names to filter values and result types. This provides:

  • Autocomplete for table and column names
  • Type validation for filter values
  • Fully typed query results

Flexible Join System

Easily create powerful joins with a fluent API:

  • Type-safe join conditions
  • Support for all join types (INNER, LEFT, RIGHT, FULL, CROSS)
  • Custom relationship definitions for more concise queries
  • Smart table alias handling

SQL Expressions & Functions

Use raw SQL expressions and ClickHouse functions when you need them:

  • Incorporate ClickHouse-specific functions
  • Mix builder methods with raw SQL when needed
  • Type safety maintained through specialized helpers
  • Support for complex expressions and subqueries

Streaming Support

Process large result sets efficiently:

  • Stream query results instead of loading everything into memory
  • Handle millions of rows without performance issues
  • Process data chunks in real time
  • Built-in progress tracking

Advanced Filtering

Build complex filtering logic:

  • Cross-filtering between different queries
  • Reusable filter definitions
  • Support for complex conditions with AND/OR logic
  • Date range filtering helpers

Comprehensive Logging

Track query execution with detailed logs:

  • Query text and parameters
  • Execution time and row counts
  • Structured logging format
  • Query-specific subscription support

Getting Started

Ready to start building with hypequery? Check out the Installation Guide to set up your project.

Use Cases

hypequery is ideal for:

  • Building analytics dashboards
  • Creating self-service data exploration tools
  • Implementing real-time monitoring applications
  • Developing ClickHouse-powered features in larger applications