提交 8678a122 authored 作者: thomasmueller's avatar thomasmueller

Javadocs

上级 cebc13f1
......@@ -44,7 +44,11 @@ import java.util.HashSet;
*/
public class Select extends Query {
/**
* The main (top) table filter.
*/
TableFilter topTableFilter;
private final ArrayList<TableFilter> filters = New.arrayList();
private final ArrayList<TableFilter> topFilters = New.arrayList();
......
......@@ -955,6 +955,12 @@ public class FullText {
}
}
/**
* Check whether the database is in multi-threaded mode.
*
* @param conn the connection
* @return true if the multi-threaded mode is used
*/
static boolean isMultiThread(Connection conn)
throws SQLException {
try (Statement stat = conn.createStatement()) {
......
......@@ -703,11 +703,21 @@ public class FullTextLucene extends FullText {
searcher = new IndexSearcher(reader);
}
/**
* Start using the searcher.
*
* @return the searcher
*/
synchronized IndexSearcher getSearcher() {
++counter;
return searcher;
}
/**
* Stop using the searcher.
*
* @param searcher the searcher
*/
synchronized void returnSearcher(IndexSearcher searcher) {
if (this.searcher == searcher) {
--counter;
......@@ -738,6 +748,9 @@ public class FullTextLucene extends FullText {
searcher = new IndexSearcher(IndexReader.open(writer, true));
}
/**
* Close the index.
*/
public synchronized void close() throws IOException {
for (IndexSearcher searcher : counters.keySet()) {
closeSearcher(searcher);
......
......@@ -896,6 +896,9 @@ public class TransactionStore {
*/
final MVMap<K, VersionedValue> map;
/**
* The transaction which is used for this map.
*/
final Transaction transaction;
TransactionMap(Transaction transaction, MVMap<K, VersionedValue> map,
......
......@@ -37,6 +37,11 @@ public class TableSynonym extends SchemaObjectBase {
return synonymFor;
}
/**
* Set (update) the data.
*
* @param data the new data
*/
public void updateData(CreateSynonymData data) {
this.data = data;
}
......@@ -46,7 +51,6 @@ public class TableSynonym extends SchemaObjectBase {
return SYNONYM;
}
@Override
public String getCreateSQLForCopy(Table table, String quotedName) {
return synonymFor.getCreateSQLForCopy(table, quotedName);
......
......@@ -76,9 +76,11 @@ public class TableView extends Table {
* dependent views.
*
* @param querySQL the SQL statement
* @param newColumnTemplates the columns
* @param session the session
* @param recursive whether this is a recursive view
* @param force if errors should be ignored
* @param literalsChecked if literals have been checked
*/
public void replace(String querySQL, Column[] newColumnTemplates, Session session,
boolean recursive, boolean force, boolean literalsChecked) {
......@@ -715,6 +717,22 @@ public class TableView extends Table {
return isPersistent;
}
/**
* Create a view.
*
* @param schema the schema
* @param id the view id
* @param name the view name
* @param querySQL the query
* @param parameters the parameters
* @param columnTemplates the columns
* @param session the session
* @param literalsChecked whether literals in the query are checked
* @param isTableExpression if this is a table expression
* @param isPersistent whether the view is persisted
* @param db the database
* @return the view
*/
public static TableView createTableViewMaybeRecursive(Schema schema, int id, String name, String querySQL,
ArrayList<Parameter> parameters, Column[] columnTemplates, Session session,
boolean literalsChecked, boolean isTableExpression, boolean isPersistent, Database db) {
......@@ -805,6 +823,17 @@ public class TableView extends Table {
return columnTemplateList;
}
/**
* Create a table for a recursive query.
*
* @param isPersistent whether the table is persisted
* @param targetSession the session
* @param cteViewName the name
* @param schema the schema
* @param columns the columns
* @param db the database
* @return the table
*/
public static Table createShadowTableForRecursiveTableExpression(boolean isPersistent, Session targetSession,
String cteViewName, Schema schema, List<Column> columns, Database db) {
......@@ -834,6 +863,13 @@ public class TableView extends Table {
return recursiveTable;
}
/**
* Remove a table for a recursive query.
*
* @param isPersistent whether the table is persisted
* @param targetSession the session
* @param recursiveTable the table
*/
public static void destroyShadowTableForRecursiveExpression(boolean isPersistent, Session targetSession,
Table recursiveTable) {
if (recursiveTable != null) {
......
......@@ -15,6 +15,9 @@ import java.util.Comparator;
*/
public class CharsetCollator extends Collator {
/**
* The comparator used to compare byte arrays.
*/
static final Comparator<byte[]> COMPARATOR = new Comparator<byte[]>() {
@Override
public int compare(byte[] b1, byte[] b2) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论