Examples of MySQLManager


Examples of com.splout.db.engine.MySQLManager

  public void test() throws Exception {
    EmbeddedMySQL mysql = new EmbeddedMySQL();
    mysql.start(true);
    try {
      // this only works with a pool of 1 connection, because the tester issues BEGIN / COMMIT with query() engine method
      final MySQLManager jdbcManager = new MySQLManager(mysql);
      basicTest(jdbcManager);
      jdbcManager.close();

    } finally {
      mysql.stop();
    }
  }
View Full Code Here

Examples of com.splout.db.engine.MySQLManager

  public void testQuerySizeLimiting() throws Exception {
    EmbeddedMySQL mysql = new EmbeddedMySQL();
    mysql.start(true);
    try {
      // this only works with a pool of 1 connection, because the tester issues BEGIN / COMMIT with query() engine method
      final MySQLManager jdbcManager = new MySQLManager(mysql);
      querySizeLimitingTest(jdbcManager);
    } finally {
      mysql.stop();
    }
  }
View Full Code Here

Examples of com.splout.db.engine.MySQLManager

  public void test() throws ClassNotFoundException, SQLException, IOException, InterruptedException {
    EmbeddedMySQL mysql = new EmbeddedMySQL();
    mysql.start(true);
    Connection conn = null;
    try {
      MySQLManager manager = new MySQLManager(mysql);
      conn = manager.getJdbcManager().getConnectionFromPool();

      insertData(conn);

      List<?> l = new QueryUtil(conn).executeQuery("SELECT * FROM test_table LIMIT 10;");
      assertEquals(10, l.size());
View Full Code Here

Examples of org.pokenet.server.network.MySqlManager

    return false;
  }

  public void run() {
    /*Record Trade on History Table*/
    MySqlManager m_database = new MySqlManager();
    if(m_database.connect(GameServer.getDatabaseHost(), GameServer.getDatabaseUsername(), GameServer.getDatabasePassword())){
      m_database.selectDatabase(GameServer.getDatabaseName());
      while(!m_queries.isEmpty()){
        m_database.query(m_queries.get(0));
        m_queries.remove(0);
      }
    }
    m_database.close();
  }
View Full Code Here

Examples of org.pokenet.server.network.MySqlManager

    /* Check if the pokemon exists */
    if(m_boxes[box].getPokemon(slot) != null) {
      if(m_boxes[box].getPokemon(slot).getDatabaseID() > -1) {
        /* This box exists and the pokemon exists in the database */
        int id = m_boxes[box].getPokemon(slot).getDatabaseID();
        MySqlManager m = new MySqlManager();
        if(m.connect(GameServer.getDatabaseHost(),
            GameServer.getDatabaseUsername(),
            GameServer.getDatabasePassword())) {
          m.selectDatabase(GameServer.getDatabaseName());
          m.query("DELETE FROM pn_pokemon WHERE id='" + id + "'");
          m.close();
          m_boxes[box].setPokemon(slot, null);
        }
      } else {
        /*
         * This Pokemon or box has not been saved to the
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.