Package de.mhus.lib.sql

Examples of de.mhus.lib.sql.DbStatement.executeQuery()


          con.commit();
      } catch (Exception e) {e.printStackTrace();}
     
      DbStatement sth = con.getStatement("select");
      try {
        DbResult res = sth.executeQuery(null);
        res.close();
      } catch (ClassNotFoundException e1) {
        System.out.println("testConnect: sql driver not found - skip test");
        return;
      } catch (SQLException e2) {
View Full Code Here


      HashMap<String, Object> attr = new HashMap<String, Object>();
      attr.put("text", "abc'");
      con.getStatement("insert").execute(attr);

      DbStatement sth = con.getStatement("select");
      DbResult res1 = sth.executeQuery(null);
      assertEquals(true,res1.next());
      String res2 = res1.getString("a_text");
      assertEquals(attr.get("text"), res2);
      res1.close();
     
View Full Code Here

      map = nameMappingRO;
    else
      map = new FallbackMap<String, Object>(attributes, nameMappingRO, true);
    try {
      DbStatement sth = con.createStatement(query);
      DbResult res = sth.executeQuery(map);
      return new DbCollection<T>(this,con,myCon != null,registryName,clazz,res);
    } catch (Throwable t) {
      throw new MException(con,query,attributes,t);
    } finally {
    // do not close, it's used by the collection
View Full Code Here

    }
   
    String tbl = config.getExtracted("table");
    DbMetadata m = ((DbApplication)getApplication()).getMetadata(tbl);
   
    DbResult res = sta.executeQuery(attributes);
    while (res.next()) {
      list.add(new DbData(this,m,res,config));
    }
    res.close();
    con.close();
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.