classes/Table.php
public function findOne($conditions, string $orderBy = null): Result
    {
        $query = $this->query()
            ->where($conditions)
            ->limit(1);

        if ($orderBy) {
            $query->orderBy($orderBy);
        }

        return $query->query();
    }
public function findOne($conditions, string $orderBy = null): Result
    {
        $query = $this->query()
            ->where($conditions)
            ->limit(1);

        if ($orderBy) {
            $query->orderBy($orderBy);
        }

        return $query->query();
    }
public function findOne ( $ conditions , string $ orderBy = null ) : Result { $ query = $ this -> query ( ) -> where ( $ conditions ) -> limit ( 1 ) ; if ( $ orderBy ) { $ query -> orderBy ( $ orderBy ) ; } return $ query -> query ( ) ; }
Builds the query for the given conditions and executes it
Will return an result with 1 or 0 rows

@param array|string $conditions
@param string|null $orderBy
@return Result
Builds the query for the given conditions and executes it Will return an result with 1 or 0 rows