提交 f2ee4267 authored 作者: Thomas Mueller's avatar Thomas Mueller

javadocs

上级 679466cf
...@@ -159,6 +159,7 @@ public class Db { ...@@ -159,6 +159,7 @@ public class Db {
* Set the value of the current parameter. * Set the value of the current parameter.
* *
* @param x the value * @param x the value
* @return itself
*/ */
public Prepared set(int x) { public Prepared set(int x) {
try { try {
...@@ -173,6 +174,7 @@ public class Db { ...@@ -173,6 +174,7 @@ public class Db {
* Set the value of the current parameter. * Set the value of the current parameter.
* *
* @param x the value * @param x the value
* @return itself
*/ */
public Prepared set(String x) { public Prepared set(String x) {
try { try {
...@@ -187,6 +189,7 @@ public class Db { ...@@ -187,6 +189,7 @@ public class Db {
* Set the value of the current parameter. * Set the value of the current parameter.
* *
* @param x the value * @param x the value
* @return itself
*/ */
public Prepared set(byte[] x) { public Prepared set(byte[] x) {
try { try {
...@@ -201,6 +204,7 @@ public class Db { ...@@ -201,6 +204,7 @@ public class Db {
* Set the value of the current parameter. * Set the value of the current parameter.
* *
* @param x the value * @param x the value
* @return itself
*/ */
public Prepared set(InputStream x) { public Prepared set(InputStream x) {
try { try {
...@@ -224,6 +228,8 @@ public class Db { ...@@ -224,6 +228,8 @@ public class Db {
/** /**
* Execute the prepared query. * Execute the prepared query.
*
* @return the result list
*/ */
public List query() { public List query() {
try { try {
......
...@@ -132,6 +132,8 @@ public class TestFunctionOverload extends TestBase { ...@@ -132,6 +132,8 @@ public class TestFunctionOverload extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @return 0
*/ */
public static int overload0() { public static int overload0() {
return 0; return 0;
...@@ -139,6 +141,9 @@ public class TestFunctionOverload extends TestBase { ...@@ -139,6 +141,9 @@ public class TestFunctionOverload extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param one the value
* @return the value
*/ */
public static int overload1or2(int one) { public static int overload1or2(int one) {
return one; return one;
...@@ -146,6 +151,10 @@ public class TestFunctionOverload extends TestBase { ...@@ -146,6 +151,10 @@ public class TestFunctionOverload extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param one the first value
* @param two the second value
* @return the sum of both
*/ */
public static int overload1or2(int one, int two) { public static int overload1or2(int one, int two) {
return one + two; return one + two;
...@@ -153,6 +162,10 @@ public class TestFunctionOverload extends TestBase { ...@@ -153,6 +162,10 @@ public class TestFunctionOverload extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param conn the connection
* @param one the value
* @return the value
*/ */
public static int overload1or2WithConn(Connection conn, int one) throws SQLException { public static int overload1or2WithConn(Connection conn, int one) throws SQLException {
conn.createStatement().executeQuery("select 1 from dual"); conn.createStatement().executeQuery("select 1 from dual");
...@@ -161,6 +174,10 @@ public class TestFunctionOverload extends TestBase { ...@@ -161,6 +174,10 @@ public class TestFunctionOverload extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param one the first value
* @param two the second value
* @return the sum of both
*/ */
public static int overload1or2WithConn(int one, int two) { public static int overload1or2WithConn(int one, int two) {
return one + two; return one + two;
...@@ -168,6 +185,10 @@ public class TestFunctionOverload extends TestBase { ...@@ -168,6 +185,10 @@ public class TestFunctionOverload extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param one the first value
* @param two the second value
* @return the sum of both
*/ */
public static int overloadError(int one, int two) { public static int overloadError(int one, int two) {
return one + two; return one + two;
...@@ -175,6 +196,10 @@ public class TestFunctionOverload extends TestBase { ...@@ -175,6 +196,10 @@ public class TestFunctionOverload extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param one the first value
* @param two the second value
* @return the sum of both
*/ */
public static int overloadError(double one, double two) { public static int overloadError(double one, double two) {
return (int) (one + two); return (int) (one + two);
......
...@@ -337,6 +337,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -337,6 +337,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param value the blob
* @return the input stream
*/ */
public static BufferedInputStream blob2stream(Blob value) throws SQLException { public static BufferedInputStream blob2stream(Blob value) throws SQLException {
if (value == null) { if (value == null) {
...@@ -348,6 +351,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -348,6 +351,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param value the input stream
* @return the buffered input stream
*/ */
public static BufferedInputStream stream2stream(InputStream value) { public static BufferedInputStream stream2stream(InputStream value) {
if (value == null) { if (value == null) {
...@@ -359,6 +365,11 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -359,6 +365,11 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param conn the connection
* @param id the test id
* @param name the text
* @return the count
*/ */
public static int addRow(Connection conn, int id, String name) throws SQLException { public static int addRow(Connection conn, int id, String name) throws SQLException {
conn.createStatement().execute("INSERT INTO TEST VALUES(" + id + ", '" + name + "')"); conn.createStatement().execute("INSERT INTO TEST VALUES(" + id + ", '" + name + "')");
...@@ -371,6 +382,10 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -371,6 +382,10 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param conn the connection
* @param sql the SQL statement
* @return the result set
*/ */
public static ResultSet select(Connection conn, String sql) throws SQLException { public static ResultSet select(Connection conn, String sql) throws SQLException {
Statement stat = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); Statement stat = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
...@@ -379,6 +394,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -379,6 +394,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param conn the connection
* @return the result set
*/ */
public static ResultSet selectMaxId(Connection conn) throws SQLException { public static ResultSet selectMaxId(Connection conn) throws SQLException {
return conn.createStatement().executeQuery("SELECT MAX(ID) FROM TEST"); return conn.createStatement().executeQuery("SELECT MAX(ID) FROM TEST");
...@@ -386,6 +404,8 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -386,6 +404,8 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @return the test array
*/ */
public static Object[] getArray() { public static Object[] getArray() {
return new Object[] { new Integer(0), "Hello" }; return new Object[] { new Integer(0), "Hello" };
...@@ -393,6 +413,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -393,6 +413,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param conn the connection
* @return the result set
*/ */
public static ResultSet nullResultSet(Connection conn) throws SQLException { public static ResultSet nullResultSet(Connection conn) throws SQLException {
PreparedStatement statement = conn.prepareStatement("select null from system_range(1,1)"); PreparedStatement statement = conn.prepareStatement("select null from system_range(1,1)");
...@@ -438,6 +461,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -438,6 +461,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param value the value
* @return the square root
*/ */
public static int root(int value) { public static int root(int value) {
if (value < 0) { if (value < 0) {
...@@ -448,6 +474,8 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -448,6 +474,8 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @return 1
*/ */
public static double mean() { public static double mean() {
return 1; return 1;
...@@ -455,6 +483,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -455,6 +483,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param dec the value
* @return the value
*/ */
public static BigDecimal noOp(BigDecimal dec) { public static BigDecimal noOp(BigDecimal dec) {
return dec; return dec;
...@@ -462,6 +493,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -462,6 +493,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param values the values
* @return the mean value
*/ */
//## Java 1.5 begin ## //## Java 1.5 begin ##
public static double mean(double... values) { public static double mean(double... values) {
...@@ -475,6 +509,10 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -475,6 +509,10 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param conn the connection
* @param values the values
* @return the mean value
*/ */
//## Java 1.5 begin ## //## Java 1.5 begin ##
public static double mean2(Connection conn, double... values) { public static double mean2(Connection conn, double... values) {
...@@ -489,6 +527,10 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -489,6 +527,10 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @param prefix the print prefix
* @param values the values
* @return the text
*/ */
//## Java 1.5 begin ## //## Java 1.5 begin ##
public static String printMean(String prefix, double... values) { public static String printMean(String prefix, double... values) {
......
...@@ -131,6 +131,8 @@ public class TestOptimizations extends TestBase { ...@@ -131,6 +131,8 @@ public class TestOptimizations extends TestBase {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
*
* @return a result set
*/ */
public static ResultSet optimizeInJoinSelect() throws SQLException { public static ResultSet optimizeInJoinSelect() throws SQLException {
SimpleResultSet rs = new SimpleResultSet(); SimpleResultSet rs = new SimpleResultSet();
......
...@@ -22,6 +22,15 @@ public class TestRights extends TestBase { ...@@ -22,6 +22,15 @@ public class TestRights extends TestBase {
private Statement stat; private Statement stat;
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String[] a) throws Exception {
TestBase.createCaller().init().test();
}
public void test() throws SQLException { public void test() throws SQLException {
testDropTempTables(); testDropTempTables();
// testLowerCaseUser(); // testLowerCaseUser();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论