package com.icomsys.main_vm.common.util;

import org.hibernate.dialect.MySQL57Dialect;
import org.hibernate.dialect.function.SQLFunctionTemplate;
import org.hibernate.dialect.function.StandardSQLFunction;
import org.hibernate.type.StandardBasicTypes;

public class CustomDialect extends MySQL57Dialect {

    public CustomDialect(){

        super();
//        registerFunction("match",
//                new SQLFunctionTemplate(StandardBasicTypes.DOUBLE,"match(?1, ?2) against (?3 in boolean mode)"));

        registerFunction(
                "GROUP_CONCAT",
                new StandardSQLFunction("group_concat", StandardBasicTypes.STRING)
        );
    }


}
