PHPackages                             laravel-freelancer-nl/aql-query-builder - 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. [Database &amp; ORM](/categories/database)
4. /
5. laravel-freelancer-nl/aql-query-builder

Abandoned → [laravel-freelancer-nl/fluentaql](/?search=laravel-freelancer-nl%2Ffluentaql)ArchivedLibrary[Database &amp; ORM](/categories/database)

laravel-freelancer-nl/aql-query-builder
=======================================

PHP AQL Query Builder

2.1.1(3y ago)121.3k2[4 PRs](https://github.com/LaravelFreelancerNL/fluentaql/pulls)MITPHPPHP ^8.0CI passing

Since Oct 12Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/LaravelFreelancerNL/fluentaql)[ Packagist](https://packagist.org/packages/laravel-freelancer-nl/aql-query-builder)[ GitHub Sponsors](https://github.com/LaravelFreelancerNL)[ RSS](/packages/laravel-freelancer-nl-aql-query-builder/feed)WikiDiscussions next Synced yesterday

READMEChangelog (10)Dependencies (10)Versions (32)Used By (0)

FluentAQL
=========

[](#fluentaql)

Fluent PHP query builder for [ArangoDB’s](https://www.arangodb.com) Query Language ([AQL](https://www.arangodb.com/docs/stable/aql/)).

---

I’m archiving my ArangoDB PHP/Laravel packages
==============================================

[](#im-archiving-my-arangodb-phplaravel-packages)

Due to the license changes ArangoDB introduced last year, it no longer makes sense for me to continue using the product or to invest further time in developing, maintaining, and improving these packages.

While building and running side projects is in many ways easier and more affordable than ever, the new license creates a significant barrier for my own projects.

I’ve genuinely enjoyed working with ArangoDB, and I still believe it is an excellent product. However, under the current licensing model, I can no longer justify the time required to support these packages. Time is my most limited resource, and I need to allocate it where it makes sense professionally.

As a result, I am archiving the following packages:

- The Laravel driver:
- The PHP client:
- The AQL query builder:

If there is interest in continuing their development, you are welcome to fork them and maintain your own versions. Alternatively, if you would like to sponsor or hire me to continue maintaining them, please feel free to get in touch.

Thank you to everyone who has used, supported, or contributed to these packages.

So long, and thanks for all the fish.

Bas
Laravel Freelancer NL
-------------------------

[](#baslaravel-freelancer-nl)

[![Latest Version](https://camo.githubusercontent.com/777fad475555fdcaa008fe72230d7644ac26232e8b29ce0cb5152ea3b61d4632/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d667265656c616e6365722d6e6c2f666c75656e7461716c2f762f737461626c65)](//packagist.org/packages/laravel-freelancer-nl/fluentaql)[![Github CI tests](https://github.com/LaravelFreelancerNL/fluentaql/workflows/Continuous%20Integration/badge.svg)](https://github.com/LaravelFreelancerNL/fluentaql/workflows/Continuous%20Integration/badge.svg)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5ef9f31e743c5e1ae872762cb94ce32863bce1aebca68faec79c6b6e46f7e921/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c61726176656c467265656c616e6365724e4c2f666c75656e7461716c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6e657874)](https://scrutinizer-ci.com/g/LaravelFreelancerNL/fluentaql/?branch=next)[![Code Coverage](https://camo.githubusercontent.com/0ee7597ef84a9501b9a8534a5ce2dc60eaa0c77004cb2dfe88f7705b5cc472b2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c61726176656c467265656c616e6365724e4c2f666c75656e7461716c2f6261646765732f636f7665726167652e706e673f623d6e657874)](https://scrutinizer-ci.com/g/LaravelFreelancerNL/fluentaql/?branch=next)[![Total Downloads](https://camo.githubusercontent.com/c4aa38f6df25298238232edd1f2dfa82a28ff8980021fa4fef54e9d857724f48/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d667265656c616e6365722d6e6c2f666c75656e7461716c2f646f776e6c6f616473)](https://packagist.org/packages/laravel-freelancer-nl/fluentaql)[![License](https://camo.githubusercontent.com/e1437123a8512a5ce14a122ca039e31a85bd558bbef3631713f8ba30a8218f6e/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d667265656c616e6365722d6e6c2f666c75656e7461716c2f6c6963656e7365)](//packagist.org/packages/laravel-freelancer-nl/fluentaql)

Table of contents
-----------------

[](#table-of-contents)

1. [Use Cases](#purpose)
2. [Requirements](#requirements)
3. [Installation](#installation)
4. [Usage](#usage)

Purpose
-------

[](#purpose)

Using a query builder mainly makes the life of a programmer much easier. You can write cleaner code and be quicker at it. Which of course comes at the cost of application speed.

*If you need bleeding edge speed you will need to write your own queries.*

The use of a query builder has both pros and cons. It is up to you to decide what you need.

**Cons:**

1. *Sacrificing speed*
2. You still need to understand ArangoDB, AQL and the 'schema' of your database.
3. Slight variations between the query builder API and the raw AQL output which may be confusing

**Pros**

1. Programmatically compose queries (e.g. search facets).
2. Easy query decomposition
3. Dry up your code.
4. Reduce AQL syntax bugs
5. Flexible expression input
6. IDE intellisense.

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

[](#requirements)

FluentAQLArangoDBPHP1.x^3.6^8.0- ArangoDB regularly adds AQL functions and clauses in minor versions. So be sure to check the AQL documentation for the availability of specific features.

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

[](#installation)

You know the drill:

```
composer require laravel-freelancer-nl/fluentaql

```

Before you begin: safety first!
-------------------------------

[](#before-you-begin-safety-first)

FluentAQL is a query builder that focuses on making your life as a developer easier while maintaining the strength and flexibility of AQL. It focuses on syntax checking of the provided expressions however that is not airtight if you don't bind user input.

**Always bind user input.**

Usage
-----

[](#usage)

First fire up a new query builder then fluently add AQL clauses on top.

### Step 1: create a query builder:

[](#step-1-create-a-query-builder)

```
use LaravelFreelancerNL\FluentAQL\QueryBuilder;

...

$qb = new QueryBuilder();

```

### Step 2: compose your query:

[](#step-2-compose-your-query)

*For Example:*

```
$qb->for('i', '1..100')->filter('i', '
