Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
676c9f13
提交
676c9f13
authored
4月 23, 2017
作者:
thomasmueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Documentation, Javadocs, formatting
上级
c240049f
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
67 行增加
和
47 行删除
+67
-47
changelog.html
h2/src/docsrc/html/changelog.html
+2
-2
BaseIndex.java
h2/src/main/org/h2/index/BaseIndex.java
+5
-6
_messages_cs.prop
h2/src/main/org/h2/res/_messages_cs.prop
+4
-0
_messages_de.prop
h2/src/main/org/h2/res/_messages_de.prop
+4
-0
_messages_es.prop
h2/src/main/org/h2/res/_messages_es.prop
+3
-0
_messages_ja.prop
h2/src/main/org/h2/res/_messages_ja.prop
+4
-0
_messages_pl.prop
h2/src/main/org/h2/res/_messages_pl.prop
+4
-0
_messages_pt_br.prop
h2/src/main/org/h2/res/_messages_pt_br.prop
+4
-0
_messages_ru.prop
h2/src/main/org/h2/res/_messages_ru.prop
+4
-0
_messages_sk.prop
h2/src/main/org/h2/res/_messages_sk.prop
+4
-0
_messages_zh_cn.prop
h2/src/main/org/h2/res/_messages_zh_cn.prop
+4
-0
help.csv
h2/src/main/org/h2/res/help.csv
+7
-1
Table.java
h2/src/main/org/h2/table/Table.java
+3
-2
ValueEnumBase.java
h2/src/main/org/h2/value/ValueEnumBase.java
+1
-1
TestCustomDataTypesHandler.java
h2/src/test/org/h2/test/jdbc/TestCustomDataTypesHandler.java
+13
-34
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
676c9f13
h2/src/main/org/h2/index/BaseIndex.java
浏览文件 @
676c9f13
...
@@ -271,12 +271,11 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
...
@@ -271,12 +271,11 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
}
else
if
(
needsToReadFromScanIndex
)
{
}
else
if
(
needsToReadFromScanIndex
)
{
rc
=
rowsCost
+
rowsCost
+
sortingCost
+
20
;
rc
=
rowsCost
+
rowsCost
+
sortingCost
+
20
;
}
else
{
}
else
{
/*
// The (20-x) calculation makes sure that when we pick a covering
* The (20-x) calculation makes sure that when we pick a covering
// index, we pick the covering index that has the smallest number of
* index, we pick the covering index that has the smallest number of
// columns (the more columns we have in index - the higher cost).
* columns (the more columns we have in index - the higher cost).
// This is faster because a smaller index will fit into fewer data
* This is faster because a smaller index will fit into fewer data blocks.
// blocks.
*/
rc
=
rowsCost
+
sortingCost
+
columns
.
length
;
rc
=
rowsCost
+
sortingCost
+
columns
.
length
;
}
}
return
rc
;
return
rc
;
...
...
h2/src/main/org/h2/res/_messages_cs.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=Dělení nulou: {0}
22012=Dělení nulou: {0}
22018=Chyba při převodu dat {0}
22018=Chyba při převodu dat {0}
22025=Chyba v LIKE escapování: {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
23502=Pro sloupec {0} není hodnota NULL povolena
23503=Nedodržení omezení referenční integrity: {0}
23503=Nedodržení omezení referenční integrity: {0}
23505=Nedodržení unikátního indexu nebo primárního klíče: {0}
23505=Nedodržení unikátního indexu nebo primárního klíče: {0}
...
...
h2/src/main/org/h2/res/_messages_de.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=Division durch 0: {0}
22012=Division durch 0: {0}
22018=Datenumwandlungsfehler beim Umwandeln von {0}
22018=Datenumwandlungsfehler beim Umwandeln von {0}
22025=Fehler in LIKE ESCAPE: {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}
23502=NULL nicht zulässig für Feld {0}
23503=Referentielle Integrität verletzt: {0}
23503=Referentielle Integrität verletzt: {0}
23505=Eindeutiger Index oder Primärschlüssel verletzt: {0}
23505=Eindeutiger Index oder Primärschlüssel verletzt: {0}
...
...
h2/src/main/org/h2/res/_messages_es.prop
浏览文件 @
676c9f13
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
22018=Conversión de datos fallida, convirtiendo {0}
22018=Conversión de datos fallida, convirtiendo {0}
22025=Error en LIKE ESCAPE: {0}
22025=Error en LIKE ESCAPE: {0}
22030=Valor no permitido para la columna {0}: {1}
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)
23502=La columna {0} no permite valores nulos (NULL)
23503=Violación de una restricción de Integridad Referencial: {0}
23503=Violación de una restricción de Integridad Referencial: {0}
23505=Violación de indice de Unicidad ó Clave primaria: {0}
23505=Violación de indice de Unicidad ó Clave primaria: {0}
...
...
h2/src/main/org/h2/res/_messages_ja.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=ゼロで除算しました: {0}
22012=ゼロで除算しました: {0}
22018=データ変換中にエラーが発生しました {0}
22018=データ変換中にエラーが発生しました {0}
22025=LIKE ESCAPE にエラーがあります: {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値が許されていません
23502=列 {0} にはnull値が許されていません
23503=参照整合性制約違反: {0}
23503=参照整合性制約違反: {0}
23505=ユニークインデックス、またはプライマリキー違反: {0}
23505=ユニークインデックス、またはプライマリキー違反: {0}
...
...
h2/src/main/org/h2/res/_messages_pl.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=Dzielenie przez zero: {0}
22012=Dzielenie przez zero: {0}
22018=Błąd konwersji danych {0}
22018=Błąd konwersji danych {0}
22025=Błąd w LIKE ESCAPE: {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}
23502=Pole nie może być NULL{0}
23503=Naruszenie więzów integralności: {0}
23503=Naruszenie więzów integralności: {0}
23505=Naruszenie ograniczenia Klucza Głównego lub Indeksu Unikalnego: {0}
23505=Naruszenie ograniczenia Klucza Głównego lub Indeksu Unikalnego: {0}
...
...
h2/src/main/org/h2/res/_messages_pt_br.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=Divisão por zero: {0}
22012=Divisão por zero: {0}
22018=Erro na conversão de dado, convertendo {0}
22018=Erro na conversão de dado, convertendo {0}
22025=Erro em LIKE ESCAPE: {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}
23502=NULL não é permitido para a coluna {0}
23503=Violação da integridade de restrição: {0}
23503=Violação da integridade de restrição: {0}
23505=Violação de índice único ou de chave primária: {0}
23505=Violação de índice único ou de chave primária: {0}
...
...
h2/src/main/org/h2/res/_messages_ru.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=Деление на ноль: {0}
22012=Деление на ноль: {0}
22018=Ошибка преобразования данных при конвертации {0}
22018=Ошибка преобразования данных при конвертации {0}
22025=Ошибка в LIKE ESCAPE: {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}
23502=Значение NULL не разрешено для поля {0}
23503=Нарушение ссылочной целостности: {0}
23503=Нарушение ссылочной целостности: {0}
23505=Нарушение уникального индекса или первичного ключа: {0}
23505=Нарушение уникального индекса или первичного ключа: {0}
...
...
h2/src/main/org/h2/res/_messages_sk.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=Delenie nulou: {0}
22012=Delenie nulou: {0}
22018=Chyba konverzie dát pre {0}
22018=Chyba konverzie dát pre {0}
22025=Chyba v LIKE ESCAPE: {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}
23502=NULL nie je povolený pre stĺpec {0}
23503=Porušenie obmedzenia (constraint) referenčnej integrity: {0}
23503=Porušenie obmedzenia (constraint) referenčnej integrity: {0}
23505=Porušenie jedinečnosti (unique) indexu alebo primárneho kľúča: {0}
23505=Porušenie jedinečnosti (unique) indexu alebo primárneho kľúča: {0}
...
...
h2/src/main/org/h2/res/_messages_zh_cn.prop
浏览文件 @
676c9f13
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
22012=除数为零: {0}
22012=除数为零: {0}
22018=转换数据{0}期间出现转换错误
22018=转换数据{0}期间出现转换错误
22025=LIKE ESCAPE(转义符)存在错误: {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值
23502=字段 {0} 不允许为NULL值
23503=违反引用完整性约束: {0}
23503=违反引用完整性约束: {0}
23505=违反唯一索引或逐渐约束: {0}
23505=违反唯一索引或逐渐约束: {0}
...
...
h2/src/main/org/h2/res/help.csv
浏览文件 @
676c9f13
...
@@ -7,7 +7,7 @@ SELECT [ TOP term ] [ DISTINCT | ALL ] selectExpression [,...]
...
@@ -7,7 +7,7 @@ SELECT [ TOP term ] [ DISTINCT | ALL ] selectExpression [,...]
FROM tableExpression [,...] [ WHERE expression ]
FROM tableExpression [,...] [ WHERE expression ]
[ GROUP BY expression [,...] ] [ HAVING expression ]
[ GROUP BY expression [,...] ] [ HAVING expression ]
[ { UNION [ ALL ] | MINUS | EXCEPT | INTERSECT } select ] [ ORDER BY order [,...] ]
[ { 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 ]
[ FOR UPDATE ]
","
","
Selects data from a table or multiple tables."
Selects data from a table or multiple tables."
...
@@ -66,6 +66,12 @@ SHOW { SCHEMAS | TABLES [ FROM schemaName ] |
...
@@ -66,6 +66,12 @@ SHOW { SCHEMAS | TABLES [ FROM schemaName ] |
COLUMNS FROM tableName [ FROM schemaName ] }
COLUMNS FROM tableName [ FROM schemaName ] }
","
","
Lists the schemas, tables, or the columns of a table."
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","
"Commands (DDL)","ALTER INDEX RENAME","
ALTER INDEX [ IF EXISTS ] indexName RENAME TO newIndexName
ALTER INDEX [ IF EXISTS ] indexName RENAME TO newIndexName
","
","
...
...
h2/src/main/org/h2/table/Table.java
浏览文件 @
676c9f13
...
@@ -1069,8 +1069,9 @@ public abstract class Table extends SchemaObjectBase {
...
@@ -1069,8 +1069,9 @@ public abstract class Table extends SchemaObjectBase {
if
(
needFindNext
&&
!
index
.
canFindNext
())
{
if
(
needFindNext
&&
!
index
.
canFindNext
())
{
continue
;
continue
;
}
}
// choose the minimal covering index with the needed first column
// choose the minimal covering index with the needed first
// to work consistently with execution plan from Optimizer
// column to work consistently with execution plan from
// Optimizer
if
(
index
.
isFirstColumn
(
column
)
&&
(
result
==
null
||
if
(
index
.
isFirstColumn
(
column
)
&&
(
result
==
null
||
result
.
getColumns
().
length
>
index
.
getColumns
().
length
))
{
result
.
getColumns
().
length
>
index
.
getColumns
().
length
))
{
result
=
index
;
result
=
index
;
...
...
h2/src/main/org/h2/value/ValueEnumBase.java
浏览文件 @
676c9f13
h2/src/test/org/h2/test/jdbc/TestCustomDataTypesHandler.java
浏览文件 @
676c9f13
...
@@ -32,13 +32,17 @@ import java.util.Locale;
...
@@ -32,13 +32,17 @@ import java.util.Locale;
/**
/**
* Tests {@link CustomDataTypesHandler}.
* Tests {@link CustomDataTypesHandler}.
*
*/
*/
public
class
TestCustomDataTypesHandler
extends
TestBase
{
public
class
TestCustomDataTypesHandler
extends
TestBase
{
/** */
/**
* The database name.
*/
public
final
static
String
DB_NAME
=
"customDataTypes"
;
public
final
static
String
DB_NAME
=
"customDataTypes"
;
/** */
/**
* The system property name.
*/
public
final
static
String
HANDLER_NAME_PROPERTY
=
"h2.customDataTypesHandler"
;
public
final
static
String
HANDLER_NAME_PROPERTY
=
"h2.customDataTypesHandler"
;
/**
/**
...
@@ -148,7 +152,8 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -148,7 +152,8 @@ public class TestCustomDataTypesHandler extends TestBase {
}
}
/**
/**
* modulus function
* The modulus function.
*
* @param val complex number
* @param val complex number
* @return result
* @return result
*/
*/
...
@@ -178,7 +183,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -178,7 +183,6 @@ public class TestCustomDataTypesHandler extends TestBase {
complexDataType
=
createComplex
();
complexDataType
=
createComplex
();
}
}
/** {@inheritDoc} */
@Override
@Override
public
DataType
getDataTypeByName
(
String
name
)
{
public
DataType
getDataTypeByName
(
String
name
)
{
if
(
name
.
toLowerCase
(
Locale
.
ENGLISH
).
equals
(
COMPLEX_DATA_TYPE_NAME
))
{
if
(
name
.
toLowerCase
(
Locale
.
ENGLISH
).
equals
(
COMPLEX_DATA_TYPE_NAME
))
{
...
@@ -188,7 +192,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -188,7 +192,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return
null
;
return
null
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
DataType
getDataTypeById
(
int
type
)
{
public
DataType
getDataTypeById
(
int
type
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
...
@@ -197,7 +200,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -197,7 +200,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return
null
;
return
null
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
String
getDataTypeClassName
(
int
type
)
{
public
String
getDataTypeClassName
(
int
type
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
...
@@ -207,7 +209,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -207,7 +209,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode
.
UNKNOWN_DATA_TYPE_1
,
"type:"
+
type
);
ErrorCode
.
UNKNOWN_DATA_TYPE_1
,
"type:"
+
type
);
}
}
/** {@inheritDoc} */
@Override
@Override
public
int
getTypeIdFromClass
(
Class
<?>
cls
)
{
public
int
getTypeIdFromClass
(
Class
<?>
cls
)
{
if
(
cls
==
ComplexNumber
.
class
)
{
if
(
cls
==
ComplexNumber
.
class
)
{
...
@@ -216,7 +217,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -216,7 +217,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return
Value
.
JAVA_OBJECT
;
return
Value
.
JAVA_OBJECT
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
Value
convert
(
Value
source
,
int
targetType
)
{
public
Value
convert
(
Value
source
,
int
targetType
)
{
if
(
source
.
getType
()
==
targetType
)
{
if
(
source
.
getType
()
==
targetType
)
{
...
@@ -252,7 +252,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -252,7 +252,6 @@ public class TestCustomDataTypesHandler extends TestBase {
}
}
}
}
/** {@inheritDoc} */
@Override
@Override
public
int
getDataTypeOrder
(
int
type
)
{
public
int
getDataTypeOrder
(
int
type
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
...
@@ -262,7 +261,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -262,7 +261,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode
.
UNKNOWN_DATA_TYPE_1
,
"type:"
+
type
);
ErrorCode
.
UNKNOWN_DATA_TYPE_1
,
"type:"
+
type
);
}
}
/** {@inheritDoc} */
@Override
@Override
public
Value
getValue
(
int
type
,
Object
data
,
DataHandler
dataHandler
)
{
public
Value
getValue
(
int
type
,
Object
data
,
DataHandler
dataHandler
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
...
@@ -272,7 +270,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -272,7 +270,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return
ValueJavaObject
.
getNoCopy
(
data
,
null
,
dataHandler
);
return
ValueJavaObject
.
getNoCopy
(
data
,
null
,
dataHandler
);
}
}
/** {@inheritDoc} */
@Override
@Override
public
Object
getObject
(
Value
value
,
Class
<?>
cls
)
{
public
Object
getObject
(
Value
value
,
Class
<?>
cls
)
{
if
(
cls
.
equals
(
ComplexNumber
.
class
))
{
if
(
cls
.
equals
(
ComplexNumber
.
class
))
{
...
@@ -285,7 +282,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -285,7 +282,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode
.
UNKNOWN_DATA_TYPE_1
,
"type:"
+
value
.
getType
());
ErrorCode
.
UNKNOWN_DATA_TYPE_1
,
"type:"
+
value
.
getType
());
}
}
/** {@inheritDoc} */
@Override
@Override
public
boolean
supportsAdd
(
int
type
)
{
public
boolean
supportsAdd
(
int
type
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
...
@@ -294,7 +290,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -294,7 +290,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return
false
;
return
false
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
int
getAddProofType
(
int
type
)
{
public
int
getAddProofType
(
int
type
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
if
(
type
==
COMPLEX_DATA_TYPE_ID
)
{
...
@@ -318,9 +313,7 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -318,9 +313,7 @@ public class TestCustomDataTypesHandler extends TestBase {
* Value type implementation that holds the complex number
* Value type implementation that holds the complex number
*/
*/
public
static
class
ValueComplex
extends
Value
{
public
static
class
ValueComplex
extends
Value
{
/**
* data itself
*/
private
ComplexNumber
val
;
private
ComplexNumber
val
;
/**
/**
...
@@ -332,70 +325,61 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -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
* @param val complex number
* @re
sult
resulting instance
* @re
turn
resulting instance
*/
*/
public
static
ValueComplex
get
(
ComplexNumber
val
)
{
public
static
ValueComplex
get
(
ComplexNumber
val
)
{
return
new
ValueComplex
(
val
);
return
new
ValueComplex
(
val
);
}
}
/** {@inheritDoc} */
@Override
@Override
public
String
getSQL
()
{
public
String
getSQL
()
{
return
val
.
toString
();
return
val
.
toString
();
}
}
/** {@inheritDoc} */
@Override
@Override
public
int
getType
()
{
public
int
getType
()
{
return
TestOnlyCustomDataTypesHandler
.
COMPLEX_DATA_TYPE_ID
;
return
TestOnlyCustomDataTypesHandler
.
COMPLEX_DATA_TYPE_ID
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
long
getPrecision
()
{
public
long
getPrecision
()
{
return
0
;
return
0
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
int
getDisplaySize
()
{
public
int
getDisplaySize
()
{
return
0
;
return
0
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
String
getString
()
{
public
String
getString
()
{
return
val
.
toString
();
return
val
.
toString
();
}
}
/** {@inheritDoc} */
@Override
@Override
public
Object
getObject
()
{
public
Object
getObject
()
{
return
val
;
return
val
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
void
set
(
PreparedStatement
prep
,
int
parameterIndex
)
throws
SQLException
{
public
void
set
(
PreparedStatement
prep
,
int
parameterIndex
)
throws
SQLException
{
Object
obj
=
JdbcUtils
.
deserialize
(
getBytesNoCopy
(),
getDataHandler
());
Object
obj
=
JdbcUtils
.
deserialize
(
getBytesNoCopy
(),
getDataHandler
());
prep
.
setObject
(
parameterIndex
,
obj
,
Types
.
JAVA_OBJECT
);
prep
.
setObject
(
parameterIndex
,
obj
,
Types
.
JAVA_OBJECT
);
}
}
/** {@inheritDoc} */
@Override
@Override
protected
int
compareSecure
(
Value
v
,
CompareMode
mode
)
{
protected
int
compareSecure
(
Value
v
,
CompareMode
mode
)
{
return
val
.
compare
((
ComplexNumber
)
v
.
getObject
());
return
val
.
compare
((
ComplexNumber
)
v
.
getObject
());
}
}
/** {@inheritDoc} */
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
return
val
.
hashCode
();
return
val
.
hashCode
();
}
}
/** {@inheritDoc} */
@Override
@Override
public
boolean
equals
(
Object
other
)
{
public
boolean
equals
(
Object
other
)
{
if
(
other
==
null
)
{
if
(
other
==
null
)
{
...
@@ -408,7 +392,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -408,7 +392,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return
complex
.
val
.
equals
(
val
);
return
complex
.
val
.
equals
(
val
);
}
}
/** {@inheritDoc} */
@Override
@Override
public
Value
convertTo
(
int
targetType
)
{
public
Value
convertTo
(
int
targetType
)
{
if
(
getType
()
==
targetType
)
{
if
(
getType
()
==
targetType
)
{
...
@@ -434,7 +417,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -434,7 +417,6 @@ public class TestCustomDataTypesHandler extends TestBase {
ErrorCode
.
DATA_CONVERSION_ERROR_1
,
getString
());
ErrorCode
.
DATA_CONVERSION_ERROR_1
,
getString
());
}
}
/** {@inheritDoc} */
@Override
@Override
public
Value
add
(
Value
value
)
{
public
Value
add
(
Value
value
)
{
ValueComplex
v
=
(
ValueComplex
)
value
;
ValueComplex
v
=
(
ValueComplex
)
value
;
...
@@ -513,13 +495,11 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -513,13 +495,11 @@ public class TestCustomDataTypesHandler extends TestBase {
}
}
}
}
/** {@inheritDoc} */
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
return
(
int
)
re
|
(
int
)
im
;
return
(
int
)
re
|
(
int
)
im
;
}
}
/** {@inheritDoc} */
@Override
@Override
public
boolean
equals
(
Object
other
)
{
public
boolean
equals
(
Object
other
)
{
if
(
other
==
null
)
{
if
(
other
==
null
)
{
...
@@ -532,7 +512,6 @@ public class TestCustomDataTypesHandler extends TestBase {
...
@@ -532,7 +512,6 @@ public class TestCustomDataTypesHandler extends TestBase {
return
(
re
==
complex
.
re
)
&&
(
im
==
complex
.
im
);
return
(
re
==
complex
.
re
)
&&
(
im
==
complex
.
im
);
}
}
/** {@inheritDoc} */
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
if
(
im
==
0.0
)
{
if
(
im
==
0.0
)
{
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
676c9f13
...
@@ -721,7 +721,7 @@ young younger youngest your yourself youtube ytd yuml yyfxyy yyyymmdd zeile zen
...
@@ -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
zepfred zero zeroes zeros zeta zhang zip ziv zloty zone zones zurich zwj zwnj
recompiled incl reveal designators templates invoked candidate handshake altered
recompiled incl reveal designators templates invoked candidate handshake altered
accomplished permanent clarify weaken excl alternatively dita imjcc optimizes
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
stefan jobs defunct spain jconn decades chrono courtesy dtl xdg avp lifecycle
experiment throughout staging booth akkuzin observed maxinplace russian
experiment throughout staging booth akkuzin observed maxinplace russian
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论