1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Indent jdbc case labels using pgjindent.

This commit is contained in:
Bruce Momjian
2001-11-19 23:16:46 +00:00
parent 6c8120d68c
commit 09634eafe1
32 changed files with 1224 additions and 1199 deletions

View File

@@ -291,7 +291,6 @@ public class ImageViewer implements ItemListener
public void run()
{
// Now the real import stuff
if (name != null && dir != null)
{

View File

@@ -214,21 +214,21 @@ public class Unicode
{
switch (mode)
{
case CREATE:
log("Exception creating database", sqle);
break;
case INSERT:
log("Exception inserting block " + blockNum, sqle);
break;
case SELECT:
log("Exception selecting block " + blockNum, sqle);
break;
case LIKE:
log("Exception doing LIKE on block " + blockNum, sqle);
break;
default:
log("Exception", sqle);
break;
case CREATE:
log("Exception creating database", sqle);
break;
case INSERT:
log("Exception inserting block " + blockNum, sqle);
break;
case SELECT:
log("Exception selecting block " + blockNum, sqle);
break;
case LIKE:
log("Exception doing LIKE on block " + blockNum, sqle);
break;
default:
log("Exception", sqle);
break;
}
}
catch (ClassNotFoundException cnfe)

View File

@@ -6,7 +6,7 @@ import java.text.*;
/*
*
* $Id: basic.java,v 1.9 2001/11/19 22:43:13 momjian Exp $
* $Id: basic.java,v 1.10 2001/11/19 23:16:44 momjian Exp $
*
* This example tests the basic components of the JDBC driver, and shows
* how even the simplest of queries can be implemented.
@@ -137,6 +137,7 @@ public class basic
// Now run the query again, showing a more efficient way of getting the
// result if you don't know what column number a value is in
System.out.println("performing another query");
rs = st.executeQuery("select * from basic where b>1");
if (rs != null)
@@ -163,6 +164,7 @@ public class basic
// Now test maxrows by setting it to 3 rows
st.setMaxRows(3);
System.out.println("performing a query limited to " + st.getMaxRows());
rs = st.executeQuery("select a, b from basic");

View File

@@ -61,7 +61,6 @@ public class blobtest
System.out.println("Now closing the connection");
s.close();
db.close();
}
/*
@@ -171,7 +170,6 @@ public class blobtest
lobj.unlink(oid);
}
//=======================================================================
// This tests the Blob interface of the JDBC 2.0 specification
public void jdbc2api(int oid) throws SQLException, IOException
{
@@ -218,8 +216,6 @@ public class blobtest
db.setAutoCommit(false);
}
//=======================================================================
public static void instructions()
{
System.err.println("java example.blobtest jdbc-url user password [debug]");

View File

@@ -9,7 +9,7 @@ import org.omg.CosNaming.*;
*
* It has no GUI, just a text frontend to keep it simple.
*
* $Id: StockClient.java,v 1.3 2001/11/19 22:43:13 momjian Exp $
* $Id: StockClient.java,v 1.4 2001/11/19 23:16:45 momjian Exp $
*/
public class StockClient
{
@@ -116,29 +116,29 @@ public class StockClient
int i = getMenu("Main", 5);
switch (i)
{
case 0:
run = false;
break;
case 0:
run = false;
break;
case 1:
displayItem();
break;
case 1:
displayItem();
break;
case 2:
bookOut();
break;
case 2:
bookOut();
break;
case 3:
bookIn();
break;
case 3:
bookIn();
break;
case 4:
order(0);
break;
case 4:
order(0);
break;
case 5:
displayAll();
break;
case 5:
displayAll();
break;
}
}
}

View File

@@ -9,7 +9,6 @@ import java.text.*;
*
* To use this example, you need a database to be in existence. This example
* will create a table called datestyle.
*
*/
public class datestyle
@@ -105,7 +104,6 @@ public class datestyle
ps.setDate(1, standard);
ps.executeUpdate();
ps.close();
}
/*

View File

@@ -218,7 +218,6 @@ public class metadata
{
if (line.startsWith("\\d"))
{
if (line.startsWith("\\d "))
{
// Display details about a table

View File

@@ -50,7 +50,7 @@ public class psql
// Now the main loop.
int tt = 0, lineno = 1;
while (tt != StreamTokenizer.TT_EOF && ! done)
{ // done added by CWJ to permit \q command
{
System.out.print("[" + lineno + "] ");
System.out.flush();
@@ -72,7 +72,6 @@ public class psql
System.out.println("Now closing the connection");
st.close();
db.close();
}
/*

View File

@@ -53,7 +53,6 @@ public class threadsafe
System.out.println("Now closing the connection");
st.close();
db.close();
}
/*
@@ -108,7 +107,6 @@ public class threadsafe
System.out.println("Waiting for threads to run");
while (thread1.isAlive() || thread2.isAlive() || thread3.isAlive())
thread0.yield();
}
finally
{