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

javadocs

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