mjacobus/php-query-builder

View on GitHub
lib/PO/QueryBuilder/Clauses/ReturningClause.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace PO\QueryBuilder\Clauses;

/**
 * @author Marcelo Jacobus <marcelo.jacobus@gmail.com>
 */
class ReturningClause extends Base
{

    /**
     * Return the resulting query
     * @return string
     */
    public function toSql()
    {
        if (!$this->isEmpty()) {
            return 'RETURNING ' . implode(', ', $this->getParams());
        }

        return '';
    }
}