public function apply(Builder $query, string $tableAlias = null, string $customName = null)
    {
        if ($this->hasBeenApplied()) {
            return;
        }

        $name = $this->buildDbName($tableAlias, $customName);

        $query->orderBy($name, $this->direction);
        $this->setApplied(true);
    }