Examples of bindValue()


Examples of com.trolltech.qt.sql.QSqlQuery.bindValue()

      query.bindValue(":weight", Global.getRecognitionWeight());
      if (!query.exec()) {
        Global.logger.log(Global.logger.LOW, query.lastError().toString());
      } else {
        while (query.next()) {
          insert.bindValue(":guid", query.value(0).toString());
          insert.exec();
        }
      }
    }
    query.clear();
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.bindValue()

    query.bindValue(":id", tempNotebook.getId());
    query.bindValue(":userid", tempNotebook.getUserId());
    query.bindValue(":notebookGuid", tempNotebook.getNotebookGuid());
    query.bindValue(":email", tempNotebook.getEmail());
    query.bindValue(":notebookModifiable", tempNotebook.isNotebookModifiable());
    query.bindValue(":requireLogin", tempNotebook.isRequireLogin());

    StringBuilder serviceCreated = new StringBuilder(simple.format(tempNotebook.getServiceCreated()));     
    query.bindValue(":serviceCreated", serviceCreated.toString());
   
    query.bindValue(":shareKey", tempNotebook.getShareKey());
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

            query.setOffset(offset);
        }
        if (values != null && !values.isEmpty()) {
            for (Map.Entry<String, QValue> entry : values.entrySet()) {
                Value value = ValueFormat.getJCRValue(entry.getValue(), sInfo.getNamePathResolver(), sInfo.getSession().getValueFactory());
                query.bindValue(entry.getKey(), value);
            }
        }
        return new QueryInfoImpl(query.execute(), idFactory,
                sInfo.getNamePathResolver(), getQValueFactory());
    }
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

        QueryManager qm = session.getWorkspace().getQueryManager();

        // SQL-2

        Query q = qm.createQuery("select text from [nt:base] where id = $id", Query.JCR_SQL2);
        q.bindValue("id", vf.createValue("1"));
        QueryResult r = q.execute();
        RowIterator it = r.getRows();
        assertTrue(it.hasNext());
        Row row = it.nextRow();
        assertEquals("hello_world", row.getValue("text").getString());
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

        hello2.setProperty("data""y");
        session.save();
        ValueFactory vf = session.getValueFactory();
        QueryManager qm = session.getWorkspace().getQueryManager();
        Query q = qm.createQuery("select id from [nt:base] where data >= $data order by id", Query.JCR_SQL2);
        q.bindValue("data", vf.createValue("x"));
        for (int i = -1; i < 5; i++) {
            QueryResult r = q.execute();
            RowIterator it = r.getRows();
            assertEquals(3, r.getRows().getSize());
            assertEquals(3, r.getNodes().getSize());
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

        hello2.setProperty("data""y");
        session.save();
        ValueFactory vf = session.getValueFactory();
        QueryManager qm = session.getWorkspace().getQueryManager();
        Query q = qm.createQuery("select id from [nt:base] where data >= $data order by id", Query.JCR_SQL2);
        q.bindValue("data", vf.createValue("x"));
        for (int limit = 0; limit < 5; limit++) {
            q.setLimit(limit);
            for (int offset = 0; offset < 3; offset++) {
                q.setOffset(offset);
                QueryResult r = q.execute();
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

        // secure
        Query q = qm.createQuery(
                "select text from [nt:base] where password = $p",
                Query.JCR_SQL2 + "-noLiterals");
        q.bindValue("p", vf.createValue("x"));
        q.execute();
    }

    @SuppressWarnings("deprecation")
    @Test
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

            query.setOffset(offset);
        }
        if (values != null && !values.isEmpty()) {
            for (Map.Entry<String, QValue> entry : values.entrySet()) {
                Value value = ValueFormat.getJCRValue(entry.getValue(), sInfo.getNamePathResolver(), sInfo.getSession().getValueFactory());
                query.bindValue(entry.getKey(), value);
            }
        }
        return new QueryInfoImpl(query, query.execute(), idFactory,
                sInfo.getNamePathResolver(), getQValueFactory());
    }
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

            query.setOffset(offset);
        }
        if (values != null && !values.isEmpty()) {
            for (Map.Entry<String, QValue> entry : values.entrySet()) {
                Value value = ValueFormat.getJCRValue(entry.getValue(), sInfo.getNamePathResolver(), sInfo.getSession().getValueFactory());
                query.bindValue(entry.getKey(), value);
            }
        }
        return new QueryInfoImpl(query.execute(), idFactory,
                sInfo.getNamePathResolver(), getQValueFactory());
    }
View Full Code Here

Examples of javax.jcr.query.Query.bindValue()

        {
            Query query = session.getWorkspace().getQueryManager().createQuery( q, Query.JCR_SQL2 );
            ValueFactory valueFactory = session.getValueFactory();
            if ( startTime != null )
            {
                query.bindValue( "start", valueFactory.createValue( createCalendar( startTime ) ) );
            }
            if ( endTime != null )
            {
                query.bindValue( "end", valueFactory.createValue( createCalendar( endTime ) ) );
            }
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.