> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fiquela.io/llms.txt
> Use this file to discover all available pages before exploring further.

# FiQueLa — File Query Language

> Query JSON, XML, CSV, XLS, YAML, and NEON files using SQL-like syntax — directly in PHP, without a database.

FiQueLa lets you filter, join, group, and aggregate data from structured files using familiar SQL concepts. Write queries as PHP fluent API calls or as SQL-like strings — your choice.

<CardGroup cols={2}>
  <Card title="Installation" icon="box" href="/installation">
    Install via Composer and set up optional format dependencies.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Write your first query against a file in under 5 minutes.
  </Card>

  <Card title="Fluent API" icon="code" href="/querying/fluent-api">
    Build queries with a chainable PHP API — selects, filters, joins, and more.
  </Card>

  <Card title="FQL Syntax" icon="terminal" href="/querying/fql-syntax">
    Write SQL-like strings to query files directly using the File Query Language.
  </Card>
</CardGroup>

## Why FiQueLa?

Work with structured files using SQL concepts you already know — no database setup required.

* **Universal format support** — XML, JSON, NDJSON, CSV, XLS/XLSX, ODS, YAML, NEON, and directories
* **Two query interfaces** — fluent PHP API or FQL string syntax, interchangeable
* **Stream-first** — large JSON, XML, and CSV files processed with low memory overhead
* **Full SQL feature set** — `JOIN`, `GROUP BY`, `HAVING`, `ORDER BY`, `UNION`, `EXPLAIN`, and 40+ built-in functions
* **DTO mapping** — map results directly to typed PHP objects

## Explore the docs

<CardGroup cols={2}>
  <Card title="Supported formats" icon="file" href="/concepts/supported-formats">
    See which file formats are supported and how to open them.
  </Card>

  <Card title="Query lifecycle" icon="arrows-spin" href="/concepts/query-lifecycle">
    Understand how FiQueLa executes a query step by step.
  </Card>

  <Card title="Conditions & operators" icon="filter" href="/querying/conditions">
    Filter data with WHERE, AND, OR, XOR, LIKE, REGEXP, BETWEEN, and more.
  </Card>

  <Card title="Functions reference" icon="function" href="/functions/string-functions">
    Browse 40+ built-in string, math, date, array, and hashing functions.
  </Card>

  <Card title="Joins" icon="link" href="/querying/joins">
    Join data across multiple files and formats in a single query.
  </Card>

  <Card title="EXPLAIN & benchmarking" icon="chart-bar" href="/advanced/explain-analyze">
    Inspect query execution plans and benchmark performance.
  </Card>
</CardGroup>

## Quick example

```php theme={null}
use FQL\Query;
use FQL\Enum\Operator;

$results = Query\Provider::fromFileQuery('xml(./products.xml).SHOP.SHOPITEM')
    ->selectAll()
    ->where('PRICE', Operator::LESS_THAN_OR_EQUAL, 200)
    ->orderBy('PRICE')->desc()
    ->limit(10)
    ->execute()
    ->fetchAll();
```

Or using FQL string syntax:

```php theme={null}
use FQL\Query;

$results = Query\Provider::fql(<<<FQL
    SELECT *
    FROM xml(./products.xml).SHOP.SHOPITEM
    WHERE PRICE <= 200
    ORDER BY PRICE DESC
    LIMIT 10
FQL)->execute()->fetchAll();
```
