1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

JDBC indenting, comment cleanups.

This commit is contained in:
Bruce Momjian
2001-11-19 22:33:39 +00:00
parent 8f6f16929a
commit f3148bef9f
75 changed files with 1909 additions and 1864 deletions

View File

@ -10,7 +10,7 @@ import org.postgresql.util.*;
// Important: There are a lot of debug code commented out. Please do not
// delete these.
/**
/*
* This class implements the Fastpath api.
*
* <p>This is a means of executing functions imbeded in the org.postgresql backend
@ -30,7 +30,7 @@ public class Fastpath
protected org.postgresql.Connection conn; // our connection
protected org.postgresql.PG_Stream stream; // the network stream
/**
/*
* Initialises the fastpath system
*
* <p><b>Important Notice</b>
@ -47,7 +47,7 @@ public class Fastpath
//DriverManager.println("Fastpath initialised");
}
/**
/*
* Send a function call to the PostgreSQL backend
*
* @param fnid Function id
@ -91,8 +91,8 @@ public class Fastpath
// as an error.
//int in = stream.ReceiveChar();
//DriverManager.println("ReceiveChar() = "+in+" '"+((char)in)+"'");
//if(in!='V') {
//if(in=='E')
//if (in!='V') {
//if (in=='E')
//throw new SQLException(stream.ReceiveString(conn.getEncoding()));
//throw new SQLException("Fastpath: expected 'V' from backend, got "+((char)in));
//}
@ -156,7 +156,7 @@ public class Fastpath
}
}
/**
/*
* Send a function call to the PostgreSQL backend by name.
*
* Note: the mapping for the procedure name to function id needs to exist,
@ -182,7 +182,7 @@ public class Fastpath
return fastpath(getID(name), resulttype, args);
}
/**
/*
* This convenience method assumes that the return value is an Integer
* @param name Function name
* @param args Function arguments
@ -197,7 +197,7 @@ public class Fastpath
return i.intValue();
}
/**
/*
* This convenience method assumes that the return value is an Integer
* @param name Function name
* @param args Function arguments
@ -209,7 +209,7 @@ public class Fastpath
return (byte[])fastpath(name, false, args);
}
/**
/*
* This adds a function to our lookup table.
*
* <p>User code should use the addFunctions method, which is based upon a
@ -225,7 +225,7 @@ public class Fastpath
func.put(name, new Integer(fnid));
}
/**
/*
* This takes a ResultSet containing two columns. Column 1 contains the
* function name, Column 2 the oid.
*
@ -265,7 +265,7 @@ public class Fastpath
}
}
/**
/*
* This returns the function id associated by its name
*
* <p>If addFunction() or addFunctions() have not been called for this name,

View File

@ -7,7 +7,7 @@ import java.util.*;
import java.sql.*;
import org.postgresql.util.*;
/**
/*
* Each fastpath call requires an array of arguments, the number and type
* dependent on the function being called.
*
@ -22,22 +22,22 @@ import org.postgresql.util.*;
*/
public class FastpathArg
{
/**
/*
* Type of argument, true=integer, false=byte[]
*/
public boolean type;
/**
/*
* Integer value if type=true
*/
public int value;
/**
/*
* Byte value if type=false;
*/
public byte[] bytes;
/**
/*
* Constructs an argument that consists of an integer value
* @param value int value to set
*/
@ -47,7 +47,7 @@ public class FastpathArg
this.value = value;
}
/**
/*
* Constructs an argument that consists of an array of bytes
* @param bytes array to store
*/
@ -57,7 +57,7 @@ public class FastpathArg
this.bytes = bytes;
}
/**
/*
* Constructs an argument that consists of part of a byte array
* @param buf source array
* @param off offset within array
@ -70,7 +70,7 @@ public class FastpathArg
System.arraycopy(buf, off, bytes, 0, len);
}
/**
/*
* Constructs an argument that consists of a String.
* @param s String to store
*/
@ -79,7 +79,7 @@ public class FastpathArg
this(s.getBytes());
}
/**
/*
* This sends this argument down the network stream.
*
* <p>The stream sent consists of the length.int4 then the contents.