public static function buildQueryDelete( QuoteInterface $quoting, $table, array $data, array $returning = null )
    {

        if( !count($data) === 0 ) {
            throw new NothingToDoException("Nothing to generate.");
        }

        $keys = self::keyTuple( $quoting, $data );
        $tuples = self::dataTuples( $data );

        return sprintf(
            "DELETE FROM %s WHERE (%s) IN (%s) %s;",
            $quoting->quoteIdent( $table ),
            $keys,
            $tuples,
            static::getReturningClause( $quoting, $returning )
        );

    }
public static function buildQueryDelete( QuoteInterface $quoting, $table, array $data, array $returning = null )
    {

        if( !count($data) === 0 ) {
            throw new NothingToDoException("Nothing to generate.");
        }

        $keys = self::keyTuple( $quoting, $data );
        $tuples = self::dataTuples( $data );

        return sprintf(
            "DELETE FROM %s WHERE (%s) IN (%s) %s;",
            $quoting->quoteIdent( $table ),
            $keys,
            $tuples,
            static::getReturningClause( $quoting, $returning )
        );

    }
public static function buildQueryDelete ( QuoteInterface $ quoting , $ table , array $ data , array $ returning = null ) { if ( ! count ( $ data ) === 0 ) { throw new NothingToDoException ( "Nothing to generate." ) ; } $ keys = self :: keyTuple ( $ quoting , $ data ) ; $ tuples = self :: dataTuples ( $ data ) ; return sprintf ( "DELETE FROM %s WHERE (%s) IN (%s) %s;" , $ quoting -> quoteIdent ( $ table ) , $ keys , $ tuples , static :: getReturningClause ( $ quoting , $ returning ) ) ; }
Delete query for a data array
@param string Table (unquoted)
@param array of data
Delete query for a data array