提交 9b9efb99 authored 作者: Thomas Mueller's avatar Thomas Mueller

docs

上级 6a0beab2
......@@ -124,7 +124,7 @@ public class Update extends Prepared {
// don't work if update is multi-row and 'inversed' the condition!
// probably need multi-row triggers with 'deleted' and 'inserted'
// at the same time. anyway good for sql compatibility
// TODO update in-place (but if the position changes,
// TODO update in-place (but if the key changes,
// we need to update all indexes) before row triggers
// the cached row is already updated - we need the old values
......
......@@ -98,7 +98,7 @@ function writeTree() {
if(node.link==null) {
document.write(node.text);
} else {
document.write("<a name='"+node.text+"' href=\""+node.link+"\" >"+node.text+"</a>");
document.write("<a id='"+node.text+"' href=\""+node.link+"\" >"+node.text+"</a>");
}
document.write("<br />");
}
......
......@@ -105,6 +105,7 @@ public class FileLock {
* Create a new file locking object.
*
* @param traceSystem the trace system to use
* @param fileName the file name
* @param sleep the number of milliseconds to sleep
*/
public FileLock(TraceSystem traceSystem, String fileName, int sleep) {
......
......@@ -201,26 +201,6 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
this.source = source;
}
/**
* Constructor a new result set that is later populated with addRow.
*
* @return the new object
*/
public static SimpleResultSet newInstance() {
return new SimpleResultSet();
}
/**
* Constructor a new result set if the rows should be retrieved using
* the specified row source object.
*
* @param source the row source
* @return the new object
*/
public static SimpleResultSet newInstance(SimpleRowSource source) {
return new SimpleResultSet(source);
}
/**
* Adds a column to the result set.
*
......
......@@ -22,11 +22,13 @@ public class IntArray {
* Create an int array with the default initial capacity.
*/
public IntArray() {
data = new int[10];
this(10);
}
/**
* Create an int array with specified initial capacity.
*
* @param capacity the initial capacity
*/
public IntArray(int capacity) {
data = new int[capacity];
......@@ -34,6 +36,8 @@ public class IntArray {
/**
* Create an int array with the given values and size.
*
* @param data the int array
*/
public IntArray(int[] data) {
this.data = data;
......
......@@ -33,7 +33,7 @@ public class GenerateHelp {
String in = "src/docsrc/help/help.csv";
String out = "src/main/org/h2/res/help.csv";
ResultSet rs = Csv.getInstance().read(in, null, null);
SimpleResultSet rs2 = SimpleResultSet.newInstance();
SimpleResultSet rs2 = new SimpleResultSet();
ResultSetMetaData meta = rs.getMetaData();
int columnCount = meta.getColumnCount() - 1;
for (int i = 0; i < columnCount; i++) {
......
......@@ -77,7 +77,7 @@ public class LinkChecker {
if (!link.startsWith("http") && !link.endsWith("h2.pdf")
&& link.indexOf("_ja.") < 0) {
if (targets.get(link) == null) {
errors.add(links.get(link) + ": link missing " + link);
errors.add(links.get(link) + ": Link missing " + link);
}
}
}
......@@ -87,7 +87,7 @@ public class LinkChecker {
}
}
for (String name : targets.keySet()) {
if (targets.get(name).equals("name")) {
if (targets.get(name).equals("id")) {
boolean ignore = false;
for (String to : IGNORE_MISSING_LINKS_TO) {
if (name.indexOf(to) >= 0) {
......@@ -138,35 +138,31 @@ public class LinkChecker {
if (idx < 0) {
break;
}
int start = idx + 4;
int end = html.indexOf("\"", start + 1);
int start = idx + " id=\"".length();
int end = html.indexOf("\"", start);
if (end < 0) {
error(fileName, "expected \" after id= " + html.substring(idx, idx + 100));
error(fileName, "Expected \" after id= " + html.substring(idx, idx + 100));
}
String ref = html.substring(start + 1, end);
String ref = html.substring(start, end);
if (!ref.startsWith("_")) {
targets.put(path + "#" + ref, "id");
}
}
idx = -1;
while (true) {
idx = html.indexOf("<a ", idx + 1);
idx = html.indexOf(" href=\"", idx + 1);
if (idx < 0) {
break;
}
int equals = html.indexOf("=", idx);
if (equals < 0) {
error(fileName, "expected = after <a at " + html.substring(idx, idx + 100));
}
String type = html.substring(idx + 2, equals).trim();
int start = html.indexOf("\"", idx);
if (start < 0) {
error(fileName, "expected \" after <a at " + html.substring(idx, idx + 100));
error(fileName, "Expected \" after href= at " + html.substring(idx, idx + 100));
}
int end = html.indexOf("\"", start + 1);
if (end < 0) {
error(fileName, "expected \" after <a at " + html.substring(idx, idx + 100));
error(fileName, "Expected \" after href= at " + html.substring(idx, idx + 100));
}
String ref = html.substring(start + 1, end);
if (type.equals("href")) {
if (ref.startsWith("http:") || ref.startsWith("https:")) {
// ok
} else if (ref.startsWith("javascript:")) {
......@@ -192,10 +188,33 @@ public class LinkChecker {
if (ref != null) {
links.put(ref, path);
}
} else if (type.equals("name")) {
targets.put(path + "#" + ref, "name");
}
idx = -1;
while (true) {
idx = html.indexOf("<a ", idx + 1);
if (idx < 0) {
break;
}
int equals = html.indexOf("=", idx);
if (equals < 0) {
error(fileName, "Expected = after <a at " + html.substring(idx, idx + 100));
}
String type = html.substring(idx + 2, equals).trim();
int start = html.indexOf("\"", idx);
if (start < 0) {
error(fileName, "Expected \" after <a at " + html.substring(idx, idx + 100));
}
int end = html.indexOf("\"", start + 1);
if (end < 0) {
error(fileName, "Expected \" after <a at " + html.substring(idx, idx + 100));
}
String ref = html.substring(start + 1, end);
if (type.equals("href")) {
// already checked
} else if (type.equals("id")) {
targets.put(path + "#" + ref, "id");
} else {
error(fileName, "unsupported <a ?: " + html.substring(idx, idx + 100));
error(fileName, "Unsupported <a ?: " + html.substring(idx, idx + 100));
}
}
}
......
......@@ -613,3 +613,4 @@ modern slight boost characteristics significantly gae vfs centrally ten
approach risky getters suxxess gmb delegate delegating delegates collisions
linkage superfluous disallow scoop moebius inputs copilot dmoebius leod jenkov
jakob poker docware peter unstable measurable scramble reissued recreation
scrambling distinguish official
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论