Package com.almworks.sqlite4java

Examples of com.almworks.sqlite4java.SQLiteStatement.bind()


                ") VALUES (?, ?, ?);"
        );
       
        st.bind(1, userId);
        st.bind(2, timeMillis);
        st.bind(3, text);
       
        st.step();

        long newId = connection.getLastInsertId();
        return new Message(newId, userId, timeMillis, text);
View Full Code Here


          " FROM " + TABLE_MESSAGES +
          " WHERE " + FIELD_TIME_MILLIS + " > ?" +
          " ORDER BY " + FIELD_TIME_MILLIS + " ASC;"
        );
       
        st.bind(1, timeMillis);

        LinkedList<Message> resList = new LinkedList<>();

        while (st.step()) {
          resList.add(new Message(
View Full Code Here

          pS.bindNull(count);
        } else {
          switch(field.getType()) {

          case INT:
            pS.bind(count, (Integer) tuple.get(tupleCount));
            break;
          case LONG:
            pS.bind(count, (Long) tuple.get(tupleCount));
            break;
          case DOUBLE:
View Full Code Here

          case INT:
            pS.bind(count, (Integer) tuple.get(tupleCount));
            break;
          case LONG:
            pS.bind(count, (Long) tuple.get(tupleCount));
            break;
          case DOUBLE:
            pS.bind(count, (Double) tuple.get(tupleCount));
            break;
          case FLOAT:
View Full Code Here

            break;
          case LONG:
            pS.bind(count, (Long) tuple.get(tupleCount));
            break;
          case DOUBLE:
            pS.bind(count, (Double) tuple.get(tupleCount));
            break;
          case FLOAT:
            pS.bind(count, (Float) tuple.get(tupleCount));
            break;
          case STRING:
View Full Code Here

            break;
          case DOUBLE:
            pS.bind(count, (Double) tuple.get(tupleCount));
            break;
          case FLOAT:
            pS.bind(count, (Float) tuple.get(tupleCount));
            break;
          case STRING:
            pS.bind(count, tuple.get(tupleCount).toString());
            break;
          case BOOLEAN: // Remember: In SQLite there are no booleans
View Full Code Here

            break;
          case FLOAT:
            pS.bind(count, (Float) tuple.get(tupleCount));
            break;
          case STRING:
            pS.bind(count, tuple.get(tupleCount).toString());
            break;
          case BOOLEAN: // Remember: In SQLite there are no booleans
            pS.bind(count, ((Boolean) tuple.get(tupleCount)) == true ? 1 : 0);
          default:
            break;
View Full Code Here

            break;
          case STRING:
            pS.bind(count, tuple.get(tupleCount).toString());
            break;
          case BOOLEAN: // Remember: In SQLite there are no booleans
            pS.bind(count, ((Boolean) tuple.get(tupleCount)) == true ? 1 : 0);
          default:
            break;
          }
        }
        count++;
View Full Code Here

                    for (String pageTitle : currentPages) {
                        addToPages(allowedCatsFull, newPages, pageTitle, includeTree, referenceTree);
                        // beware: add pageTitle to allowedCatsFull _AFTER_ adding its dependencies
                        // (otherwise the dependencies won't be added)
                        allowedCatsFull.add(pageTitle);
                        stmt.bind(1, pageTitle).stepThrough().reset();
                    }
                    stmt.dispose();

                    println(msgOut, "  adding sub-categories of " + currentPages.size() + " categories or templates");
                    // add all categories the page belongs to
View Full Code Here

                    for (String pageTitle : currentPages) {
                        addToPages(allPages, newPages, pageTitle, includeTree, referenceTree);
                        // beware: add pageTitle to pages _AFTER_ adding its dependencies
                        // (otherwise the dependencies won't be added)
                        allPages.add(pageTitle);
                        stmt.bind(1, pageTitle).stepThrough().reset();
                    }
                    stmt.dispose();

                    println(msgOut, "  adding categories of " + currentPages.size() + " pages");
                    // add all categories the page belongs to
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.