protected function executeQuery($select = null, $conditions = null, $values = [], $options = [])
    {
        $query = $this->db->connect();
        if (!empty($this->fetchRefs)) {
            $query = $this->setupJoin($query, $select, $conditions, (isset($options['order']) ? $options['order'] : null));
        } else {
            $query = (!is_null($select) ? $query->select($select) : $query->select());
            $query = $query->from($this->table);
            if (!is_null($conditions)) {
                $query = $query->where($conditions);
            }
            if (isset($options['order'])) {
                $query = $query->orderBy($options['order']);
            }
        }
        
        if (isset($options['limit'])) {
            $query = $query->limit($options['limit']);
        }
        if (isset($options['offset'])) {
            $query = $query->offset($options['offset']);
        }
        
        return $query->execute($values);
    }