Package org.jugile.util

Examples of org.jugile.util.DBPool


      c.execute();
    }     
  }

  public static List<Msg> getMessages(String node, int max) {
    DBPool pool = DBPool.getPool();
    DBConnection c = pool.getConnection();
    List<Msg> msgs = new ArrayList<Msg>();
    try {
      String sql ="";
      sql += "select msg_id, nodeid, status, ts from dbmq_queue_t ";
      sql += "where nodeid=? AND status=? ORDER BY ts LIMIT ?";
View Full Code Here


    }
    return msgs;
  }
 
  public static int flush(String name) {
    DBPool pool = DBPool.getPool();
    DBConnection c = pool.getConnection();
    try {
      String sql = "delete from dbmq_queue_t where nodeid=?";
      c.prepare(sql);
      c.param(name);
      int res = c.execute();
View Full Code Here

    }
    return 0;
  }

  public static int flushNotNew(String name) {
    DBPool pool = DBPool.getPool();
    DBConnection c = pool.getConnection();
    try {
      String sql = "delete from dbmq_queue_t where nodeid=? and status!=0";
      c.prepare(sql);
      c.param(name);
      int res = c.execute();
View Full Code Here

import org.jugile.util.Time;

public class DBTest extends JugileTestCase {

  public static void clearDatabase() throws Exception {
    DBPool db = DBPool.getPool();
    DBConnection c = db.getConnection();
    c.updateN("delete from person_t");
    c.updateN("delete from family_t");
    c.updateN("delete from map_person_2friend_family");
    c.updateN("delete from dbmq_queue_t");
    c.updateN("delete from dbmq_messages_t");
View Full Code Here

TOP

Related Classes of org.jugile.util.DBPool

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.