Package l2p.database

Examples of l2p.database.FiltredStatement.addBatch()


          {
            TextBuilder sb = TextBuilder.newInstance();
            fs = con.createStatement();
            for(Entry<Integer, Long> tmp : _StatKills.entrySet())
            {
              fs.addBatch(sb.append("REPLACE DELAYED INTO `killcount` SET `npc_id`=").append(tmp.getKey()).append(", `count`=").append(tmp.getValue()).append(", `char_id`=").append(_objectId).toString());
              sb.clear();
            }
            TextBuilder.recycle(sb);
            fs.executeBatch();
            DatabaseUtils.closeStatement(fs);
View Full Code Here


          {
            TextBuilder sb = TextBuilder.newInstance();
            fs = con.createStatement();
            for(Entry<Integer, Long> tmp : _StatCraft.entrySet())
            {
              fs.addBatch(sb.append("REPLACE DELAYED INTO `craftcount` SET `item_id`=").append(tmp.getKey()).append(", `count`=").append(tmp.getValue()).append(", `char_id`=").append(_objectId).toString());
              sb.clear();
            }
            TextBuilder.recycle(sb);
            fs.executeBatch();
            DatabaseUtils.closeStatement(fs);
View Full Code Here

          {
            TextBuilder sb = TextBuilder.newInstance();
            fs = con.createStatement();
            for(Entry<Integer, Long> tmp : _StatDrop.entrySet())
            {
              fs.addBatch(sb.append("REPLACE DELAYED INTO `craftcount` SET `item_id`=").append(tmp.getKey()).append(", `count`=").append(tmp.getValue()).append(", `char_id`=").append(_objectId).toString());
              sb.clear();
            }
            TextBuilder.recycle(sb);
            fs.executeBatch();
            DatabaseUtils.closeStatement(fs);
View Full Code Here

      fs = con.createStatement();
      for(L2NpcTemplate t : NpcTable.getAll())
      {
        if(t != null && t.killscount > 0)
        {
          fs.addBatch(sb.append("REPLACE INTO `killcount` SET `npc_id`=").append(t.npcId).append(", `count`=").append(t.killscount).append(", `char_id`=-1").toString());
          sb.clear();
        }
      }
      TextBuilder.recycle(sb);
      fs.executeBatch();
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.