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

win.doyto.query.config.GlobalConfiguration Maven / Gradle / Ivy

There is a newer version: 0.2.2.1-RELEASE
Show newest version
package win.doyto.query.config;

import lombok.Getter;
import lombok.Setter;
import win.doyto.query.core.Dialect;

/**
 * GlobalConfiguration
 *
 * @author f0rb
 */
@Getter
@Setter
public class GlobalConfiguration {

    private boolean mapCamelCaseToUnderscore;
    private Dialect dialect = (sql, limit, offset) -> sql + " LIMIT " + limit + (sql.startsWith("SELECT") ? " OFFSET " + offset : "");

    private GlobalConfiguration() {
    }

    public static GlobalConfiguration instance() {
        return Singleton.instance;
    }

    private static class Singleton {
        private static GlobalConfiguration instance = new GlobalConfiguration();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy