提交 676c9f13 authored 作者: thomasmueller's avatar thomasmueller

Documentation, Javadocs, formatting

上级 c240049f
......@@ -271,12 +271,11 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
} else if (needsToReadFromScanIndex) {
rc = rowsCost + rowsCost + sortingCost + 20;
} else {
/*
* The (20-x) calculation makes sure that when we pick a covering
* index, we pick the covering index that has the smallest number of
* columns (the more columns we have in index - the higher cost).
* This is faster because a smaller index will fit into fewer data blocks.
*/
// The (20-x) calculation makes sure that when we pick a covering
// index, we pick the covering index that has the smallest number of
// columns (the more columns we have in index - the higher cost).
// This is faster because a smaller index will fit into fewer data
// blocks.
rc = rowsCost + sortingCost + columns.length;
}
return rc;
......
......@@ -9,6 +9,10 @@
22012=Dělení nulou: {0}
22018=Chyba při převodu dat {0}
22025=Chyba v LIKE escapování: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=Pro sloupec {0} není hodnota NULL povolena
23503=Nedodržení omezení referenční integrity: {0}
23505=Nedodržení unikátního indexu nebo primárního klíče: {0}
......
......@@ -9,6 +9,10 @@
22012=Division durch 0: {0}
22018=Datenumwandlungsfehler beim Umwandeln von {0}
22025=Fehler in LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=NULL nicht zulässig für Feld {0}
23503=Referentielle Integrität verletzt: {0}
23505=Eindeutiger Index oder Primärschlüssel verletzt: {0}
......
......@@ -10,6 +10,9 @@
22018=Conversión de datos fallida, convirtiendo {0}
22025=Error en LIKE ESCAPE: {0}
22030=Valor no permitido para la columna {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=La columna {0} no permite valores nulos (NULL)
23503=Violación de una restricción de Integridad Referencial: {0}
23505=Violación de indice de Unicidad ó Clave primaria: {0}
......
......@@ -9,6 +9,10 @@
22012=ゼロで除算しました: {0}
22018=データ変換中にエラーが発生しました {0}
22025=LIKE ESCAPE にエラーがあります: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=列 {0} にはnull値が許されていません
23503=参照整合性制約違反: {0}
23505=ユニークインデックス、またはプライマリキー違反: {0}
......
......@@ -9,6 +9,10 @@
22012=Dzielenie przez zero: {0}
22018=Błąd konwersji danych {0}
22025=Błąd w LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=Pole nie może być NULL{0}
23503=Naruszenie więzów integralności: {0}
23505=Naruszenie ograniczenia Klucza Głównego lub Indeksu Unikalnego: {0}
......
......@@ -9,6 +9,10 @@
22012=Divisão por zero: {0}
22018=Erro na conversão de dado, convertendo {0}
22025=Erro em LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=NULL não é permitido para a coluna {0}
23503=Violação da integridade de restrição: {0}
23505=Violação de índice único ou de chave primária: {0}
......
......@@ -9,6 +9,10 @@
22012=Деление на ноль: {0}
22018=Ошибка преобразования данных при конвертации {0}
22025=Ошибка в LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=Значение NULL не разрешено для поля {0}
23503=Нарушение ссылочной целостности: {0}
23505=Нарушение уникального индекса или первичного ключа: {0}
......
......@@ -9,6 +9,10 @@
22012=Delenie nulou: {0}
22018=Chyba konverzie dát pre {0}
22025=Chyba v LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=NULL nie je povolený pre stĺpec {0}
23503=Porušenie obmedzenia (constraint) referenčnej integrity: {0}
23505=Porušenie jedinečnosti (unique) indexu alebo primárneho kľúča: {0}
......
......@@ -9,6 +9,10 @@
22012=除数为零: {0}
22018=转换数据{0}期间出现转换错误
22025=LIKE ESCAPE(转义符)存在错误: {0}
22030=#Value not permitted for column {0}: {1}
22031=#Value not a member of enumerators {0}: {1}
22032=#Empty enums are not allowed
22033=#Duplicate enumerators are not allowed for enum types: {0}
23502=字段 {0} 不允许为NULL值
23503=违反引用完整性约束: {0}
23505=违反唯一索引或逐渐约束: {0}
......
......@@ -7,7 +7,7 @@ SELECT [ TOP term ] [ DISTINCT | ALL ] selectExpression [,...]
FROM tableExpression [,...] [ WHERE expression ]
[ GROUP BY expression [,...] ] [ HAVING expression ]
[ { UNION [ ALL ] | MINUS | EXCEPT | INTERSECT } select ] [ ORDER BY order [,...] ]
[ [ LIMIT expression ] [ OFFSET expression ] [ SAMPLE_SIZE rowCountInt ] ]
[ { LIMIT expression [ OFFSET expression ] [ SAMPLE_SIZE rowCountInt ] } | { [ OFFSET expression { ROW | ROWS } ] [ { FETCH { FIRST | NEXT } expression { ROW | ROWS } ONLY } ] } ]
[ FOR UPDATE ]
","
Selects data from a table or multiple tables."
......@@ -66,6 +66,12 @@ SHOW { SCHEMAS | TABLES [ FROM schemaName ] |
COLUMNS FROM tableName [ FROM schemaName ] }
","
Lists the schemas, tables, or the columns of a table."
"Commands (DML)","WITH","
WITH [ RECURSIVE ] name ( columnName [,...] )
AS ( select )
select
","
Can be used to create a recursive query."
"Commands (DDL)","ALTER INDEX RENAME","
ALTER INDEX [ IF EXISTS ] indexName RENAME TO newIndexName
","
......
......@@ -1069,8 +1069,9 @@ public abstract class Table extends SchemaObjectBase {
if (needFindNext && !index.canFindNext()) {
continue;
}
// choose the minimal covering index with the needed first column
// to work consistently with execution plan from Optimizer
// choose the minimal covering index with the needed first
// column to work consistently with execution plan from
// Optimizer
if (index.isFirstColumn(column) && (result == null ||
result.getColumns().length > index.getColumns().length)) {
result = index;
......
......@@ -32,13 +32,17 @@ import java.util.Locale;
/**
* Tests {@link CustomDataTypesHandler}.
*
*/
public class TestCustomDataTypesHandler extends TestBase {
/** */
/**
* The database name.
*/
public final static String DB_NAME = "customDataTypes";
/** */
/**
* The system property name.
*/
public final static String HANDLER_NAME_PROPERTY = "h2.customDataTypesHandler";
/**
......@@ -148,7 +152,8 @@ public class TestCustomDataTypesHandler extends TestBase {
}
/**
* modulus function
* The modulus function.
*
* @param val complex number
* @return result
*/
......@@ -178,7 +183,6 @@ public class TestCustomDataTypesHandler extends TestBase {
complexDataType = createComplex();
}
/** {@inheritDoc} */
@Override
public DataType getDataTypeByName(String name) {
if (name.toLowerCase(Locale.ENGLISH).equals(COMPLEX_DATA_TYPE_NAME)) {
......@@ -188,7 +192,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return null;
}
/** {@inheritDoc} */
@Override
public DataType getDataTypeById(int type) {
if (type == COMPLEX_DATA_TYPE_ID) {
......@@ -197,7 +200,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return null;
}
/** {@inheritDoc} */
@Override
public String getDataTypeClassName(int type) {
if (type == COMPLEX_DATA_TYPE_ID) {
......@@ -207,7 +209,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode.UNKNOWN_DATA_TYPE_1, "type:" + type);
}
/** {@inheritDoc} */
@Override
public int getTypeIdFromClass(Class<?> cls) {
if (cls == ComplexNumber.class) {
......@@ -216,7 +217,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return Value.JAVA_OBJECT;
}
/** {@inheritDoc} */
@Override
public Value convert(Value source, int targetType) {
if (source.getType() == targetType) {
......@@ -252,7 +252,6 @@ public class TestCustomDataTypesHandler extends TestBase {
}
}
/** {@inheritDoc} */
@Override
public int getDataTypeOrder(int type) {
if (type == COMPLEX_DATA_TYPE_ID) {
......@@ -262,7 +261,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode.UNKNOWN_DATA_TYPE_1, "type:" + type);
}
/** {@inheritDoc} */
@Override
public Value getValue(int type, Object data, DataHandler dataHandler) {
if (type == COMPLEX_DATA_TYPE_ID) {
......@@ -272,7 +270,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return ValueJavaObject.getNoCopy(data, null, dataHandler);
}
/** {@inheritDoc} */
@Override
public Object getObject(Value value, Class<?> cls) {
if (cls.equals(ComplexNumber.class)) {
......@@ -285,7 +282,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode.UNKNOWN_DATA_TYPE_1, "type:" + value.getType());
}
/** {@inheritDoc} */
@Override
public boolean supportsAdd(int type) {
if (type == COMPLEX_DATA_TYPE_ID) {
......@@ -294,7 +290,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return false;
}
/** {@inheritDoc} */
@Override
public int getAddProofType(int type) {
if (type == COMPLEX_DATA_TYPE_ID) {
......@@ -318,9 +313,7 @@ public class TestCustomDataTypesHandler extends TestBase {
* Value type implementation that holds the complex number
*/
public static class ValueComplex extends Value {
/**
* data itself
*/
private ComplexNumber val;
/**
......@@ -332,70 +325,61 @@ public class TestCustomDataTypesHandler extends TestBase {
}
/**
* Get ValueComplex instance for given ComplexNumber
* Get ValueComplex instance for given ComplexNumber.
*
* @param val complex number
* @result resulting instance
* @return resulting instance
*/
public static ValueComplex get(ComplexNumber val) {
return new ValueComplex(val);
}
/** {@inheritDoc} */
@Override
public String getSQL() {
return val.toString();
}
/** {@inheritDoc} */
@Override
public int getType() {
return TestOnlyCustomDataTypesHandler.COMPLEX_DATA_TYPE_ID;
}
/** {@inheritDoc} */
@Override
public long getPrecision() {
return 0;
}
/** {@inheritDoc} */
@Override
public int getDisplaySize() {
return 0;
}
/** {@inheritDoc} */
@Override
public String getString() {
return val.toString();
}
/** {@inheritDoc} */
@Override
public Object getObject() {
return val;
}
/** {@inheritDoc} */
@Override
public void set(PreparedStatement prep, int parameterIndex) throws SQLException {
Object obj = JdbcUtils.deserialize(getBytesNoCopy(), getDataHandler());
prep.setObject(parameterIndex, obj, Types.JAVA_OBJECT);
}
/** {@inheritDoc} */
@Override
protected int compareSecure(Value v, CompareMode mode) {
return val.compare((ComplexNumber) v.getObject());
}
/** {@inheritDoc} */
@Override
public int hashCode() {
return val.hashCode();
}
/** {@inheritDoc} */
@Override
public boolean equals(Object other) {
if (other == null) {
......@@ -408,7 +392,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return complex.val.equals(val);
}
/** {@inheritDoc} */
@Override
public Value convertTo(int targetType) {
if (getType() == targetType) {
......@@ -434,7 +417,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode.DATA_CONVERSION_ERROR_1, getString());
}
/** {@inheritDoc} */
@Override
public Value add(Value value) {
ValueComplex v = (ValueComplex)value;
......@@ -513,13 +495,11 @@ public class TestCustomDataTypesHandler extends TestBase {
}
}
/** {@inheritDoc} */
@Override
public int hashCode() {
return (int)re | (int)im;
}
/** {@inheritDoc} */
@Override
public boolean equals(Object other) {
if (other == null) {
......@@ -532,7 +512,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return (re==complex.re) && (im == complex.im);
}
/** {@inheritDoc} */
@Override
public String toString() {
if (im == 0.0) {
......
......@@ -721,7 +721,7 @@ young younger youngest your yourself youtube ytd yuml yyfxyy yyyymmdd zeile zen
zepfred zero zeroes zeros zeta zhang zip ziv zloty zone zones zurich zwj zwnj
recompiled incl reveal designators templates invoked candidate handshake altered
accomplished permanent clarify weaken excl alternatively dita imjcc optimizes
dotall multiline xdoclint
dotall multiline xdoclint scenario
stefan jobs defunct spain jconn decades chrono courtesy dtl xdg avp lifecycle
experiment throughout staging booth akkuzin observed maxinplace russian
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论