Comments on SQL Tools

Last modified by Laurent Veuillet on 2022/02/28 00:00

  • beldaz
    beldaz, 2014/07/17 07:09

    Note that the default query 'SHOW TABLES' is not supported by PostgreSQL. Use this instead:
    SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';

  • Laurent Veuillet
    Laurent Veuillet, 2021/08/16 10:51

    J'ai ajouté le code ci-dessous pour ne pas avoir à passer par un formulaire :

      /

    • Obtenir un objet connection à partir des paramètres
         */
        Connection getConnectionFromParameters(url, userName, password, driver){
          if(!userName)
            throw new Exception("You must fill the field 'user'");
          if(!url)
            throw new Exception("You must fill the field 'url'");
          if(!driver)
            throw new Exception("You must fill the field 'driver'");
          Class.forName (driver).newInstance ();
          def conn = DriverManager.getConnection (url, userName, password);
          return conn;
        }

Get Connected