src/Koldy/Db/Query.php
public function getSQL(): string
    {
        if ($this->query === null) {
            throw new Exception('Query wasn\'t set');
        }

        if (is_object($this->query)) {
            if (method_exists($this->query, '__toString')) {
                return $this->query->__toString();
            }
        } else {
            return trim($this->query);
        }

        $className = get_class($this->query);
        throw new Exception("Can not use class={$className} as database query because it can't be used as string");
    }
public function getSQL(): string
    {
        if ($this->query === null) {
            throw new Exception('Query wasn\'t set');
        }

        if (is_object($this->query)) {
            if (method_exists($this->query, '__toString')) {
                return $this->query->__toString();
            }
        } else {
            return trim($this->query);
        }

        $className = get_class($this->query);
        throw new Exception("Can not use class={$className} as database query because it can't be used as string");
    }
public function getSQL ( ) : string { if ( $ this -> query === null ) { throw new Exception ( 'Query wasn\'t set' ) ; } if ( is_object ( $ this -> query ) ) { if ( method_exists ( $ this -> query , '__toString' ) ) { return $ this -> query -> __toString ( ) ; } } else { return trim ( $ this -> query ) ; } $ className = get_class ( $ this -> query ) ; throw new Exception ( "Can not use class={$className} as database query because it can't be used as string" ) ; }
Get the SQL query, without bindings

@return string
@throws Exception
Get the SQL query without bindings