Mercurial > hg > monetdb-java
changeset 258:acf34e20a832
Improve comment text and layout
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 22 Nov 2018 13:34:15 +0100 (2018-11-22) |
parents | 529b92d09fc6 |
children | 1485870ae208 |
files | example/SQLImport.java |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/example/SQLImport.java +++ b/example/SQLImport.java @@ -14,7 +14,7 @@ import java.io.*; * it's simpleness it only supports SQL queries which entirely are on one line. * * This program reads a file line by line, and feeds the line into a running - * Mserver on the localhost. Upon error, the error is reported and the program + * Mserver5 on the localhost. Upon error, the error is reported and the program * continues reading and executing lines. * A very lousy way of implementing options is used to somewhat configure the * behaviour of the program in order to be a bit more verbose or commit after @@ -37,11 +37,11 @@ public class SQLImport { // open the file BufferedReader fr = new BufferedReader(new FileReader(args[0])); - // request a connection suitable for Monet from the driver manager + // request a connection suitable for MonetDB from the driver manager // note that the database specifier is currently not implemented, for - // Monet itself can't access multiple databases. + // MonetDB itself can't access multiple databases. // turn on debugging - Connection con = DriverManager.getConnection("jdbc:monetdb://localhost/database?debug=true", "monetdb", "monetdb"); + Connection con = DriverManager.getConnection("jdbc:monetdb://localhost/demo?debug=true", "monetdb", "monetdb"); boolean beVerbose = false; if (args.length == 3) { @@ -58,13 +58,15 @@ public class SQLImport { String query; for (int i = 1; (query = fr.readLine()) != null; i++) { - if (beVerbose) System.out.println(query); + if (beVerbose) + System.out.println(query); try { // execute the query, no matter what it is stmt.execute(query); } catch (SQLException e) { System.out.println("Error on line " + i + ": " + e.getMessage()); - if (!beVerbose) System.out.println(query); + if (!beVerbose) + System.out.println(query); } }