All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.virtusa.gto.nyql.db.maria.MariaSql.groovy Maven / Gradle / Ivy

package com.virtusa.gto.nyql.db.maria

import com.virtusa.gto.nyql.CTE
import com.virtusa.gto.nyql.QResultProxy
import com.virtusa.gto.nyql.db.TranslatorOptions
import com.virtusa.gto.nyql.db.mysql.MySql
import com.virtusa.gto.nyql.exceptions.NyException
import com.virtusa.gto.nyql.exceptions.NySyntaxException
import com.virtusa.gto.nyql.model.DbInfo

/**
 * @author iweerarathna
 */
class MariaSql extends MySql {

    MariaSql() {
        super()
    }

    MariaSql(TranslatorOptions theOptions, DbInfo dbInfo) {
        super(theOptions, dbInfo)
    }

    @Override
    List ___cteQuery(CTE cte) throws NyException {
        if (!isUnresolvedVersion(dbInfo) && dbInfo.majorVersion >= 10 && dbInfo.minorVersion >= 2) {
            return generateCTE(cte)
        } else {
            throw new NySyntaxException('MariaDB does not had support for Common Table Expressions prior to version 10.2!')
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy