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

Cleanup:

- Mainly Javadoc changes.
上级 6216db17
......@@ -35,8 +35,8 @@ public class DbInspector {
}
/**
* Set the preferred Date class.
* Possible values are: java.util.Date (default) and java.sql.Timestamp.
* Set the preferred Date class. Possible values are: java.util.Date
* (default), java.sql.Date, java.sql.Timestamp.
*
* @param dateClass the new date class
*/
......@@ -115,10 +115,10 @@ public class DbInspector {
Class<T> clazz = (Class<T>) model.getClass();
TableDefinition<T> def = db.define(clazz);
boolean forceUpperCase = getMetaData().storesUpperCaseIdentifiers();
String sname = (forceUpperCase && def.schemaName != null) ?
String schema = (forceUpperCase && def.schemaName != null) ?
def.schemaName.toUpperCase() : def.schemaName;
String tname = forceUpperCase ? def.tableName.toUpperCase() : def.tableName;
List<TableInspector> tables = findTables(sname, tname);
String table = forceUpperCase ? def.tableName.toUpperCase() : def.tableName;
List<TableInspector> tables = findTables(schema, table);
return tables.get(0);
}
......
......@@ -10,33 +10,36 @@ import org.h2.jaqu.Table.JQColumn;
import org.h2.jaqu.Table.JQTable;
/**
* Model class for JaQu to track db and table versions.
*
* A JaQu system table to track database and table versions.
*/
@JQTable(name = "_jq_versions", primaryKey = "schemaName tableName", memoryTable = true)
public class DbVersion {
@JQColumn(name = "schemaName", allowNull = false)
String schema;
String schema = "";
@JQColumn(name = "tableName", allowNull = false)
String table;
String table = "";
@JQColumn(name = "version")
Integer version;
private int todoReviewWholeClass;
public DbVersion() {
// nothing to do
}
/**
* Constructor for defining a version entry.
* (SCHEMA="" && TABLE="") == DATABASE
* Constructor for defining a version entry. Both the schema and the table
* are empty strings, which means this is the row for the 'database'.
*
* @param version
* @param version the database version
*/
public DbVersion(int version) {
this.schema = "";
this.table = "";
this.version = version;
}
}
......@@ -11,6 +11,9 @@ package org.h2.jaqu;
* update statement.
*/
public interface Declaration {
final static int renameClassToUpdateDeclaration = 0;
/**
* Append the SQL to the given statement using the given query.
*
......@@ -19,4 +22,5 @@ public interface Declaration {
//## Java 1.5 begin ##
void appendSQL(SQLStatement stat);
//## Java 1.5 end ##
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论