protected static function getReturningClause( QuoteInterface $quoting, array $returning = null, $table = '' )
    {
        if( $returning === null ) {
            return 'RETURNING *';
        } elseif ( $returning === array() ) {
            return '';
        } elseif( !empty( $table ) ) {
            foreach( $returning as &$value ) {
                $value = "{$table}.{$value}";
            }
        }

        return "RETURNING ". implode(
            ',',
            $returning = array_map(
                array( $quoting, 'quoteIdent' ),
                $returning
            )
        );
    }