PHPackages                             absorbing/cql-core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. absorbing/cql-core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

absorbing/cql-core
==================

Core library for the C-QL CSV Query Language

0.1.0(3mo ago)03MITPHPCI passing

Since May 10Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Absorbing/cql-core)[ Packagist](https://packagist.org/packages/absorbing/cql-core)[ RSS](/packages/absorbing-cql-core/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

CQL Core
========

[](#cql-core)

[![Build Status](https://github.com/Absorbing/cql-core/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/Absorbing/cql-core/actions/workflows/phpunit.yaml)[![Version](https://camo.githubusercontent.com/ba535e092ec77b6ceaeadc3a563d2673de82533d9ff67066dcc4bfb9568598f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e312e302d626c7565)](https://camo.githubusercontent.com/ba535e092ec77b6ceaeadc3a563d2673de82533d9ff67066dcc4bfb9568598f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e312e302d626c7565)[![PHP](https://camo.githubusercontent.com/040bda2f904c60d234b086a20fdda1151a04f7c18e4b9956ccf71cb0350a32ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e342532422d707572706c65)](https://camo.githubusercontent.com/040bda2f904c60d234b086a20fdda1151a04f7c18e4b9956ccf71cb0350a32ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e342532422d707572706c65)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)

**CQL (CSV Query Language)** is a SQL-like query language designed specifically for querying and manipulating CSV files in PHP. It provides a familiar SQL syntax for filtering, joining, and transforming CSV data without requiring a database.

Important

This is v0.1.0 - a read-only query library. Write operations (INSERT, UPDATE, DELETE) are planned for future releases. See [CHANGELOG.md](CHANGELOG.md) for details.

Features
--------

[](#features)

- **SQL-like Syntax** - Write queries using familiar SELECT, FROM, WHERE, JOIN, and GROUP BY statements
- **Aggregate Functions** - COUNT, SUM, AVG, MIN, MAX for data analysis
- **Date Functions** - YEAR, MONTH, DAY, DATE for date-based analysis
- **Multiple Data Sources** - Define and query multiple CSV files in a single query
- **JOIN Support** - Perform INNER, LEFT, and RIGHT joins between CSV files
- **Streaming Mode** - Process large files (&gt;50MB) with minimal memory usage
- **Expression Engine** - Support for mathematical and logical expressions in WHERE clauses
- **Column Aliasing** - Rename columns in your result set
- **Wildcard Selection** - Select all columns or prefix-specific columns with `*` syntax
- **Header Detection** - Automatically handle CSVs with or without headers
- **Simple Facade API** - Clean, intuitive interface with convenience methods
- **Type-Safe** - Built with PHP 8.4+ features including readonly classes and enums
- **Extensible** - Modular operator system for easy extension
- **Well Tested** - 50 tests with 186 assertions covering core functionality

Requirements
------------

[](#requirements)

- PHP 8.4 or higher
- Composer

Installation
------------

[](#installation)

```
composer require absorbing/cql-core
```

Quick Start
-----------

[](#quick-start)

```
