Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-dev] Support MySQL51 User Functions

Would be good to resolve,

 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=211249

 

at the same time, by not creating a subclass, just renaming the platform to MySQLPlatform, as we generally do not put the version name in platforms (Oracle JDBC platforms are different as they have compile dependencies), and the current MySQL4Platform already has MySQL5 functionality in it.

 

 

-----Original Message-----
From: MICHAEL.NORMAN@xxxxxxxxxx
Sent: Wednesday, May 28, 2008 2:30 PM
To: Dev mailing list for Eclipse Persistence Services
Subject: [eclipselink-dev] Support MySQL51 User Functions

 

I have created a new database platform in order to support User Functions for MySQL 5.1.
All that was required was surrounding '
{ }' brackets and a slightly different order for the CALL clause:

public class MySQL51Platform extends MySQL4Platform {
    @Override
    public boolean supportsStoredFunctions() {
        return true;
    }
   
    @Override
    public String buildProcedureCallString(StoredProcedureCall call, AbstractSession session) {
        return "{ " + super.buildProcedureCallString(call, session);
    }

    @Override
    public String getFunctionCallHeader() {
        return "? " + getAssignmentString() + getProcedureCallHeader();
            // different order -  CALL clause ^^^ comes AFTER assignment operator
    }
   
    @Override
    public String getProcedureCallTail() {
        return " }"; // case-sensitive
    }
}

I have a DBWS test case working, but some more extensive testing is likely required. Any problem checking
this in for M8?

--
Oracle Email Signature Logo
Mike Norman | Principal Software Designer | 613.288.4638
Oracle Server Technologies | TopLink Product
45 O'Connor Street, Suite 400 | Ottawa, ON K1P 1A4 | (fax) 613.238.2818


Back to the top