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

com.jn.sqlhelper.dialect.scriptfile.SQLServerSqlStatementBuilder Maven / Gradle / Ivy

package com.jn.sqlhelper.dialect.scriptfile;

import com.jn.sqlhelper.common.sql.sqlscript.PlainSqlDelimiter;
import com.jn.sqlhelper.common.sql.sqlscript.PlainSqlStatementBuilder;

/**
 * supporting SQL Server-specific delimiter changes.
 */
public class SQLServerSqlStatementBuilder extends PlainSqlStatementBuilder {
    @Override
    protected PlainSqlDelimiter getDefaultDelimiter() {
        return new PlainSqlDelimiter("GO", true);
    }

    @Override
    protected String extractAlternateOpenQuote(String token) {
        if (token.startsWith("N'")) {
            return "N'";
        }
        return null;
    }

    @Override
    protected String computeAlternateCloseQuote(String openQuote) {
        return "'";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy