Package com.datastax.driver.core

Examples of com.datastax.driver.core.RegularStatement


            Utils.joinAndAppend(builder, " AND ", usings.usings, variables);
        }
        builder.append(' ');

        for (int i = 0; i < statements.size(); i++) {
            RegularStatement stmt = statements.get(i);
            if (stmt instanceof BuiltStatement) {
                BuiltStatement bst = (BuiltStatement)stmt;
                builder.append(maybeAddSemicolon(bst.buildQueryString(variables)));

            } else {
                String str = stmt.getQueryString();
                builder.append(str);
                if (!str.trim().endsWith(";"))
                    builder.append(';');

                if (variables != null) {
                    ByteBuffer[] vars = stmt.getValues();
                    if (vars != null) {
                        Collections.addAll(variables, vars);
                    }
                }
            }
View Full Code Here


      pStatement = cachedStatement.get();
    }

    if (pStatement == null) {
      try {
        RegularStatement stmt = getQueryGen(query).call();
        if (LOG.isDebugEnabled()) {
          LOG.debug("Query: " + stmt.getQueryString());
        }
        pStatement = sessionRef.get().prepare(stmt.getQueryString());
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.RegularStatement

Copyright © 2018 www.massapicom. 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.