Examples of sql()


Examples of com.jcabi.jdbc.JdbcSession.sql()

    public Stats get(final String domain) throws IOException {
        try {
            final JdbcSession session = new JdbcSession(this.connection())
                .autocommit(false);
            // @checkstyle LineLength (2 lines)
            final Stats result = session
                .sql("SELECT SUM(BYTES) FROM DOMAIN_STATS WHERE DOMAIN = ? FOR UPDATE")
                .set(domain)
                .select(STATS);
            session.sql("DELETE FROM DOMAIN_STATS WHERE DOMAIN = ?")
                .set(domain)
View Full Code Here

Examples of de.zalando.sprocwrapper.SProcCall.sql()

                storedProcedure = new StoredProcedure(name, method.getGenericReturnType(), sprocStrategy,
                        scA.runOnAllShards(), scA.searchShards(), scA.parallel(), resultMapper,
                        scA.timeoutInMilliSeconds(), scA.adivsoryLockType(), useValidation, scA.readOnly(),
                        writeTransaction);
                if (!"".equals(scA.sql())) {
                    storedProcedure.setQuery(scA.sql());
                }
            } catch (final InstantiationException | IllegalAccessException e) {
                LOG.error("Could not instantiate StoredProcedure. ABORTING.", e);
                return null;
View Full Code Here

Examples of net.hydromatic.tpcds.query.Query.sql()

    checkQuery(72).planContains("xx");
  }

  private OptiqAssert.AssertQuery checkQuery(int i) {
    final Query query = Query.of(i);
    String sql = query.sql(-1, new Random(0));
    switch (i) {
    case 72:
      // Work around OPTIQ-304: Support '<DATE> + <INTEGER>'.
      sql = sql.replace("+ 5", "+ interval '5' day");
    }
View Full Code Here

Examples of org.activiti.engine.task.NativeTaskQuery.sql()

                .parameter("processDefinitionKey", "leave-formkey").parameter("suspensionState", SuspensionState.ACTIVE.getStateCode())
                .parameter("userId", user.getId());
        List<Task> tasks = query.listPage(pageParams[0], pageParams[1]);

        page.setResult(tasks);
        page.setTotalCount(query.sql("select count(*) from (" + sql + ") as CT").count());
        mav.addObject("page", page);
        return mav;
    }

    /**
 
View Full Code Here

Examples of org.apache.spark.sql.api.java.JavaSQLContext.sql()

    // Apply a schema to an RDD of Java Beans and register it as a table.
    JavaSchemaRDD schemaPeople = sqlCtx.applySchema(people, Person.class);
    schemaPeople.registerAsTable("people");

    // SQL can be run over RDDs that have been registered as tables.
    JavaSchemaRDD teenagers = sqlCtx.sql("SELECT name FROM people WHERE age >= 13 AND age <= 19");

    // The results of SQL queries are SchemaRDDs and support all the normal RDD operations.
    // The columns of a row in the result can be accessed by ordinal.
    List<String> teenagerNames = teenagers.map(new Function<Row, String>() {
      public String call(Row row) {
View Full Code Here

Examples of org.apache.velocity.tools.generic.EscapeTool.sql()

        /* html */
        assertEquals("&quot;&amp;&lt;&gt;&nbsp;",escapeTool.html("\"&<>"+(char)160));
        /* url */
        assertEquals("%40%2F%3F%3D+%26",escapeTool.url("@/?= &"));
        /* sql */
        assertEquals("''",escapeTool.sql("'"));
        /* xml */
        assertEquals("&quot;&amp;&lt;&gt;",escapeTool.html("\"&<>"));
    }

    public @Test void testMathTool() {
View Full Code Here

Examples of org.apache.velocity.tools.generic.EscapeTool.sql()

        /* html */
        assertEquals("&quot;&amp;&lt;&gt;&nbsp;",escapeTool.html("\"&<>"+(char)160));
        /* url */
        assertEquals("%40%2F%3F%3D+%26",escapeTool.url("@/?= &"));
        /* sql */
        assertEquals("''",escapeTool.sql("'"));
        /* xml */
        assertEquals("&quot;&amp;&lt;&gt;",escapeTool.html("\"&<>"));
        /* unicode */
        assertEquals("\uf00b", escapeTool.unicode("f00b"));
        assertEquals("\u1010", escapeTool.unicode("\\u1010"));
View Full Code Here

Examples of org.conventionsframework.qualifier.Query.sql()

        if(!serviceClass.equals(BaseService.class)){
           service = (BaseService) BeanManagerController.getBeanByType(serviceClass);
        }
        javax.persistence.Query q = null;

        if(!"".equals(query.sql())){
             q = service.crud().getEntityManager().createQuery(query.sql());
        }
        else if(!"".equals(query.namedQuery())){
             q = service.crud().getEntityManager().createNamedQuery(query.namedQuery());
        }
View Full Code Here

Examples of org.hibernate.annotations.SQLDelete.sql()

      collection.setCustomSQLUpdate( sqlUpdate.sql(), sqlUpdate.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlUpdate.check().toString().toLowerCase() )
      );
    }
    if ( sqlDelete != null ) {
      collection.setCustomSQLDelete( sqlDelete.sql(), sqlDelete.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlDelete.check().toString().toLowerCase() )
      );
    }
    if ( sqlDeleteAll != null ) {
      collection.setCustomSQLDeleteAll( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
View Full Code Here

Examples of org.hibernate.annotations.SQLDelete.sql()

      persistentClass.setCustomSQLUpdate( sqlUpdate.sql(), sqlUpdate.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlUpdate.check().toString().toLowerCase() )
      );
    }
    if ( sqlDelete != null ) {
      persistentClass.setCustomSQLDelete( sqlDelete.sql(), sqlDelete.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlDelete.check().toString().toLowerCase() )
      );
    }
    if ( sqlDeleteAll != null ) {
      persistentClass.setCustomSQLDelete( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
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.