Package org.eigenbase.sql.util

Examples of org.eigenbase.sql.util.SqlBuilder.literal()


        // "TYPE" clause is optional
        final String type = server.getType();
        if ((type != null) && !type.equals("UNKNOWN")) {
            sb.append(" TYPE ");
            sb.literal(type);
        }

        // "VERSION" clause is optional
        final String version = server.getVersion();
        if ((version != null) && !version.equals("UNKNOWN")) {
View Full Code Here


        // "VERSION" clause is optional
        final String version = server.getVersion();
        if ((version != null) && !version.equals("UNKNOWN")) {
            sb.append(" VERSION ");
            sb.literal(version);
        }
        sb.append(NL);
        sb.append("FOREIGN DATA WRAPPER ");
        name(sb, null, server.getWrapper().getName());
        addOptions(
View Full Code Here

        sb.append(NL);
        if (user.getEncryptedPassword() == null) {
            sb.append("AUTHORIZATION ");
            // Auths are not stored by the parser.
            sb.literal("Unused");
        } else {
            sb.append("IDENTIFIED BY ");
            sb.literal("********");
        }
        stmt.addStmt(sb.getSqlAndClear());
View Full Code Here

            sb.append("AUTHORIZATION ");
            // Auths are not stored by the parser.
            sb.literal("Unused");
        } else {
            sb.append("IDENTIFIED BY ");
            sb.literal("********");
        }
        stmt.addStmt(sb.getSqlAndClear());

        CwmNamespace ns = user.getDefaultNamespace();
        if (ns != null) {
View Full Code Here

        addDescription(sb, jar);

        stmt.addStmt(sb.getSqlAndClear());
        sb.append(NL);
        sb.append("LIBRARY ");
        sb.literal(jar.getUrl());
        sb.append(NL);
        sb.append("OPTIONS(");
        sb.append(jar.getDeploymentState());
        sb.append(")");
View Full Code Here

        stmt.addStmt(sb.getSqlAndClear());

        // "LIBRARY" clause is optional
        if (wrapper.getLibraryFile() != null) {
            sb.append(" LIBRARY ");
            sb.literal(wrapper.getLibraryFile());
        }
        sb.append(NL);
        sb.append("LANGUAGE ");
        sb.append(wrapper.getLanguage());
        addOptions(
View Full Code Here

                || (previousSetSchema == null)
                || !previousSetSchema.equals(schemaName)))
        {
            SqlBuilder sb = createSqlBuilder();
            sb.append("SET SCHEMA ");
            sb.literal(sb.getDialect().quoteIdentifier(schemaName));
            stmt.addStmt(sb.getSql());
            previousSetSchema = schemaName;
            return true;
        } else {
            return false;
View Full Code Here

        String initialSchema = info.getProperty("schema");
        if (initialSchema != null) {
            Statement stmt = this.createStatement();
            final SqlBuilder buf = new SqlBuilder(SqlDialect.EIGENBASE);
            buf.append("set schema ");
            buf.literal(initialSchema);
            final String sql = buf.getSql();
            try {
                stmt.executeUpdate(sql);
            } finally {
                try {
View Full Code Here

        // the jar argument to install_jar is already quoted
        // if needed.  But is there some sanitization we need
        // to do, or is no SQL injection attack possible?
        sql.append(jar);
        sql.append(" library ");
        sql.literal(url);
        sql.append(" options(");
        sql.append(deploy);
        sql.append(")");
        executeSql(sql.getSql());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.