Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
8c9a2ff1
Unverified
提交
8c9a2ff1
authored
6 年前
作者:
Noel Grandin
提交者:
GitHub
6 年前
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1238 from grandinj/remove_unfinished_android_code
remove unfinished android API
上级
11b7e7cd
273552fe
显示空白字符变更
内嵌
并排
正在显示
44 个修改的文件
包含
1 行增加
和
2647 行删除
+1
-2647
Activity.java
h2/src/tools/android/app/Activity.java
+0
-17
package.html
h2/src/tools/android/app/package.html
+0
-14
ContentResolver.java
h2/src/tools/android/content/ContentResolver.java
+0
-15
ContentValues.java
h2/src/tools/android/content/ContentValues.java
+0
-15
Context.java
h2/src/tools/android/content/Context.java
+0
-19
package.html
h2/src/tools/android/content/package.html
+0
-14
AbstractCursor.java
h2/src/tools/android/database/AbstractCursor.java
+0
-15
AbstractWindowedCursor.java
h2/src/tools/android/database/AbstractWindowedCursor.java
+0
-15
CharArrayBuffer.java
h2/src/tools/android/database/CharArrayBuffer.java
+0
-15
ContentObserver.java
h2/src/tools/android/database/ContentObserver.java
+0
-15
Cursor.java
h2/src/tools/android/database/Cursor.java
+0
-293
CursorWindow.java
h2/src/tools/android/database/CursorWindow.java
+0
-15
DataSetObserver.java
h2/src/tools/android/database/DataSetObserver.java
+0
-15
SQLException.java
h2/src/tools/android/database/SQLException.java
+0
-23
package.html
h2/src/tools/android/database/package.html
+0
-14
SQLiteClosable.java
h2/src/tools/android/database/sqlite/SQLiteClosable.java
+0
-15
package.html
h2/src/tools/android/database/sqlite/package.html
+0
-14
Uri.java
h2/src/tools/android/net/Uri.java
+0
-15
package.html
h2/src/tools/android/net/package.html
+0
-14
Bundle.java
h2/src/tools/android/os/Bundle.java
+0
-15
package.html
h2/src/tools/android/os/package.html
+0
-14
Test.java
h2/src/tools/android/test/Test.java
+0
-71
package.html
h2/src/tools/android/test/package.html
+0
-14
H2AbortException.java
h2/src/tools/org/h2/android/H2AbortException.java
+0
-22
H2Closable.java
h2/src/tools/org/h2/android/H2Closable.java
+0
-48
H2ConstraintException.java
h2/src/tools/org/h2/android/H2ConstraintException.java
+0
-22
H2Cursor.java
h2/src/tools/org/h2/android/H2Cursor.java
+0
-295
H2CursorDriver.java
h2/src/tools/org/h2/android/H2CursorDriver.java
+0
-48
H2Database.java
h2/src/tools/org/h2/android/H2Database.java
+0
-708
H2DatabaseCorruptException.java
h2/src/tools/org/h2/android/H2DatabaseCorruptException.java
+0
-21
H2DiskIOException.java
h2/src/tools/org/h2/android/H2DiskIOException.java
+0
-21
H2DoneException.java
h2/src/tools/org/h2/android/H2DoneException.java
+0
-23
H2Exception.java
h2/src/tools/org/h2/android/H2Exception.java
+0
-23
H2FullException.java
h2/src/tools/org/h2/android/H2FullException.java
+0
-21
H2MisuseException.java
h2/src/tools/org/h2/android/H2MisuseException.java
+0
-21
H2OpenHelper.java
h2/src/tools/org/h2/android/H2OpenHelper.java
+0
-81
H2Program.java
h2/src/tools/org/h2/android/H2Program.java
+0
-120
H2Query.java
h2/src/tools/org/h2/android/H2Query.java
+0
-70
H2QueryBuilder.java
h2/src/tools/org/h2/android/H2QueryBuilder.java
+0
-235
H2Statement.java
h2/src/tools/org/h2/android/H2Statement.java
+0
-77
H2TransactionListener.java
h2/src/tools/org/h2/android/H2TransactionListener.java
+0
-28
H2Utils.java
h2/src/tools/org/h2/android/H2Utils.java
+0
-26
package.html
h2/src/tools/org/h2/android/package.html
+0
-14
Build.java
h2/src/tools/org/h2/build/Build.java
+1
-37
没有找到文件。
h2/src/tools/android/app/Activity.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
app
;
import
android.content.Context
;
/**
* Something a user can do.
*/
public
class
Activity
extends
Context
{
// TODO
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/app/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/android/content/ContentResolver.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
content
;
/**
* TODO
*/
public
class
ContentResolver
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/content/ContentValues.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
content
;
/**
* A key-value pair.
*/
public
class
ContentValues
{
// TODO
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/content/Context.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
content
;
/**
* TODO
*/
public
class
Context
{
/**
* The file may only be accessed by this application, or by application with
* the same user ID.
*/
public
static
final
int
MODE_PRIVATE
=
0
;
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/content/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/AbstractCursor.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
/**
* This class implements some of the cursor operations.
*/
public
abstract
class
AbstractCursor
implements
Cursor
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/AbstractWindowedCursor.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
/**
* The base class for a database cursor.
*/
public
abstract
class
AbstractWindowedCursor
extends
AbstractCursor
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/CharArrayBuffer.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
/**
* TODO
*/
public
class
CharArrayBuffer
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/ContentObserver.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
/**
* TODO
*/
public
class
ContentObserver
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/Cursor.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
import
android.content.ContentResolver
;
import
android.net.Uri
;
import
android.os.Bundle
;
/**
* This interface allows to access the rows in a result set.
*/
public
interface
Cursor
{
/**
* Get the row count.
*
* @return the row count
*/
int
getCount
();
/**
* Deactivate the cursor. The cursor can be re-activated using requery().
*/
void
deactivate
();
/**
* Get the column index. The first column is 0.
*
* @param columnName the name of the column
* @return the column index, or -1 if the column was not found
*/
int
getColumnIndex
(
String
columnName
);
/**
* Close the cursor.
*/
void
close
();
/**
* Get the column names.
*
* @return the column names
*/
String
[]
getColumnNames
();
/**
* Register a data set observer.
*
* @param observer the observer
*/
void
registerDataSetObserver
(
DataSetObserver
observer
);
/**
* Re-run the query.
*
* @return TODO
*/
boolean
requery
();
/**
* Move the cursor by the given number of rows forward or backward.
*
* @param offset the row offset
* @return true if the operation was successful
*/
boolean
move
(
int
offset
);
/**
* TODO
*/
void
copyStringToBuffer
(
int
columnIndex
,
CharArrayBuffer
buffer
);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
byte
[]
getBlob
(
int
columnIndex
);
/**
* Get the number of columns in the result.
*
* @return the column count
*/
int
getColumnCount
();
/**
* Get the column index for the given column name, or throw an exception if
* not found.
*
* @param columnName the column name
* @return the index
*/
int
getColumnIndexOrThrow
(
String
columnName
);
/**
* Get the name of the given column.
*
* @param columnIndex the column index (0, 1,...)
* @return the name
*/
String
getColumnName
(
int
columnIndex
);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
double
getDouble
(
int
columnIndex
);
/**
* TODO
*
* @return TODO
*/
Bundle
getExtras
();
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
float
getFloat
(
int
columnIndex
);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
int
getInt
(
int
columnIndex
);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
long
getLong
(
int
columnIndex
);
/**
* Get the current row number
*
* @return the row number TODO 0, 1,...
*/
int
getPosition
();
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
short
getShort
(
int
columnIndex
);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
String
getString
(
int
columnIndex
);
/**
* The method onMove is only called if this method returns true.
*
* @return true if calling onMove is required
*/
boolean
getWantsAllOnMoveCalls
();
/**
* Check if the current position is past the last row.
*
* @return true if it is
*/
boolean
isAfterLast
();
/**
* Check if the current position is before the first row.
*
* @return true if it is
*/
boolean
isBeforeFirst
();
/**
* Check if the cursor is closed.
*
* @return true if it is
*/
boolean
isClosed
();
/**
* Check if the current position is on the first row.
*
* @return true if it is
*/
boolean
isFirst
();
/**
* Check if the current position is on the last row.
*
* @return true if it is
*/
boolean
isLast
();
/**
* Check if the value of the current row is null.
*
* @param columnIndex the column index (0, 1,...)
* @return true if it is
*/
boolean
isNull
(
int
columnIndex
);
/**
* Move to the first row.
*
* @return TODO
*/
boolean
moveToFirst
();
/**
* Move to the last row.
*
* @return TODO
*/
boolean
moveToLast
();
/**
* Move to the next row.
*
* @return TODO
*/
boolean
moveToNext
();
/**
* Move to the given row.
*
* @param position TODO
* @return TODO
*/
boolean
moveToPosition
(
int
position
);
/**
* Move to the previous row.
*
* @return TODO
*/
boolean
moveToPrevious
();
/**
* TODO
*
* @param observer TODO
*/
void
registerContentObserver
(
ContentObserver
observer
);
/**
* TODO
*
* @param extras TODO
* @return TODO
*/
Bundle
respond
(
Bundle
extras
);
/**
* TODO
*
* @param cr TODO
* @param uri TODO
*/
void
setNotificationUri
(
ContentResolver
cr
,
Uri
uri
);
/**
* TODO
*
* @param observer TODO
*/
void
unregisterContentObserver
(
ContentObserver
observer
);
/**
* TODO
*
* @param observer TODO
*/
void
unregisterDataSetObserver
(
DataSetObserver
observer
);
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/CursorWindow.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
/**
* An instance of this class can contain multiple rows.
*/
public
class
CursorWindow
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/DataSetObserver.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
/**
* A listener for changes in a data set.
*/
public
abstract
class
DataSetObserver
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/SQLException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
;
/**
* A database exception.
*/
public
class
SQLException
extends
Exception
{
private
static
final
long
serialVersionUID
=
1L
;
public
SQLException
()
{
super
();
}
public
SQLException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/sqlite/SQLiteClosable.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
database
.
sqlite
;
/**
* An object that can be closed.
*/
public
abstract
class
SQLiteClosable
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/database/sqlite/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/android/net/Uri.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
net
;
/**
* TODO
*/
public
class
Uri
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/net/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/android/os/Bundle.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
os
;
/**
* TODO
*/
public
class
Bundle
{
// empty
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/os/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/android/test/Test.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
android
.
test
;
import
org.h2.android.H2Database
;
import
org.h2.android.H2Utils
;
import
android.app.Activity
;
import
android.database.Cursor
;
/**
* Tests the Android API.
*/
public
class
Test
extends
Activity
{
public
static
void
main
(
String
...
args
)
throws
Exception
{
H2Database
db
=
H2Utils
.
openOrCreateDatabase
(
"helloWorld.db"
,
MODE_PRIVATE
,
null
);
log
(
"opened ps="
+
db
.
getPageSize
());
try
{
// db.execSQL("DROP TABLE IF EXISTS test");
// log("dropped");
db
.
execSQL
(
"CREATE TABLE if not exists test(ID INTEGER PRIMARY KEY, NAME VARCHAR)"
);
log
(
"created"
);
for
(
int
j
=
0
;
j
<
10
;
j
++)
{
Cursor
c
=
db
.
rawQuery
(
"select * from test"
,
new
String
[
0
]);
int
count
=
c
.
getCount
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
c
.
move
(
1
);
c
.
getInt
(
0
);
c
.
getString
(
1
);
}
c
.
close
();
}
// log("select " + count);
db
.
execSQL
(
"delete from test"
);
log
(
"delete"
);
db
.
beginTransaction
();
for
(
int
i
=
0
;
i
<
1000
;
i
++)
{
db
.
execSQL
(
"INSERT INTO TEST VALUES(?, 'Hello')"
,
new
Object
[]
{
i
});
}
db
.
setTransactionSuccessful
();
db
.
endTransaction
();
log
(
"inserted"
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
Cursor
c
=
db
.
rawQuery
(
"select * from test where id=?"
,
new
String
[]
{
""
+
i
});
int
count
=
c
.
getCount
();
if
(
count
>
0
)
{
c
.
move
(
1
);
c
.
getInt
(
0
);
c
.
getString
(
1
);
}
c
.
close
();
}
log
(
"select"
);
}
finally
{
db
.
close
();
log
(
"closed"
);
}
}
private
static
void
log
(
String
s
)
{
System
.
out
.
println
(
s
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/android/test/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains tests.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2AbortException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* This exception is thrown when the operation was aborted.
*/
public
class
H2AbortException
extends
H2Exception
{
private
static
final
long
serialVersionUID
=
1L
;
H2AbortException
()
{
super
();
}
H2AbortException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Closable.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
android.database.sqlite.SQLiteClosable
;
/**
* An object that can be closed.
*/
public
abstract
class
H2Closable
extends
SQLiteClosable
{
/**
* TODO
*/
public
void
acquireReference
()
{
// TODO
}
/**
* TODO
*/
public
void
releaseReference
()
{
// TODO
}
/**
* TODO
*/
public
void
releaseReferenceFromContainer
()
{
// TODO
}
/**
* TODO
*/
protected
abstract
void
onAllReferencesReleased
();
/**
* TODO
*/
protected
void
onAllReferencesReleasedFromContainer
()
{
// TODO
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2ConstraintException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* This exception is thrown when a constraint was violated.
*/
public
class
H2ConstraintException
extends
H2Exception
{
private
static
final
long
serialVersionUID
=
1L
;
H2ConstraintException
()
{
super
();
}
H2ConstraintException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Cursor.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
org.h2.result.ResultInterface
;
import
android.content.ContentResolver
;
import
android.database.AbstractWindowedCursor
;
import
android.database.CharArrayBuffer
;
import
android.database.ContentObserver
;
import
android.database.CursorWindow
;
import
android.database.DataSetObserver
;
import
android.net.Uri
;
import
android.os.Bundle
;
/**
* A cursor implementation.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2Cursor
extends
AbstractWindowedCursor
{
private
H2Database
database
;
private
ResultInterface
result
;
H2Cursor
(
H2Database
db
,
H2CursorDriver
driver
,
String
editTable
,
H2Query
query
)
{
this
.
database
=
db
;
// TODO
}
H2Cursor
(
ResultInterface
result
)
{
this
.
result
=
result
;
}
@Override
public
void
close
()
{
result
.
close
();
}
@Override
public
void
deactivate
()
{
// TODO
}
@Override
public
int
getColumnIndex
(
String
columnName
)
{
return
0
;
}
@Override
public
String
[]
getColumnNames
()
{
return
null
;
}
@Override
public
int
getCount
()
{
return
result
.
isLazy
()
?
-
1
:
result
.
getRowCount
();
}
/**
* Get the database that created this cursor.
*
* @return the database
*/
public
H2Database
getDatabase
()
{
return
database
;
}
/**
* The cursor moved to a new position.
*
* @param oldPosition the previous position
* @param newPosition the new position
* @return TODO
*/
public
boolean
onMove
(
int
oldPosition
,
int
newPosition
)
{
return
false
;
}
@Override
public
void
registerDataSetObserver
(
DataSetObserver
observer
)
{
// TODO
}
@Override
public
boolean
requery
()
{
return
false
;
}
/**
* Set the parameter values.
*
* @param selectionArgs the parameter values
*/
public
void
setSelectionArguments
(
String
[]
selectionArgs
)
{
// TODO
}
/**
* TODO
*
* @param window the window
*/
public
void
setWindow
(
CursorWindow
window
)
{
// TODO
}
@Override
public
boolean
move
(
int
offset
)
{
if
(
offset
==
1
)
{
return
result
.
next
();
}
throw
H2Database
.
unsupported
();
}
@Override
public
void
copyStringToBuffer
(
int
columnIndex
,
CharArrayBuffer
buffer
)
{
// TODO
}
@Override
public
byte
[]
getBlob
(
int
columnIndex
)
{
// TODO
return
null
;
}
@Override
public
int
getColumnCount
()
{
// TODO
return
0
;
}
@Override
public
int
getColumnIndexOrThrow
(
String
columnName
)
{
// TODO
return
0
;
}
@Override
public
String
getColumnName
(
int
columnIndex
)
{
// TODO
return
null
;
}
@Override
public
double
getDouble
(
int
columnIndex
)
{
// TODO
return
0
;
}
@Override
public
Bundle
getExtras
()
{
// TODO
return
null
;
}
@Override
public
float
getFloat
(
int
columnIndex
)
{
// TODO
return
0
;
}
@Override
public
int
getInt
(
int
columnIndex
)
{
return
result
.
currentRow
()[
columnIndex
].
getInt
();
}
@Override
public
long
getLong
(
int
columnIndex
)
{
return
result
.
currentRow
()[
columnIndex
].
getLong
();
}
@Override
public
int
getPosition
()
{
// TODO
return
0
;
}
@Override
public
short
getShort
(
int
columnIndex
)
{
// TODO
return
0
;
}
@Override
public
String
getString
(
int
columnIndex
)
{
return
result
.
currentRow
()[
columnIndex
].
getString
();
}
@Override
public
boolean
getWantsAllOnMoveCalls
()
{
// TODO
return
false
;
}
@Override
public
boolean
isAfterLast
()
{
// TODO
return
false
;
}
@Override
public
boolean
isBeforeFirst
()
{
// TODO
return
false
;
}
@Override
public
boolean
isClosed
()
{
// TODO
return
false
;
}
@Override
public
boolean
isFirst
()
{
// TODO
return
false
;
}
@Override
public
boolean
isLast
()
{
// TODO
return
false
;
}
@Override
public
boolean
isNull
(
int
columnIndex
)
{
// TODO
return
false
;
}
@Override
public
boolean
moveToFirst
()
{
// TODO
return
false
;
}
@Override
public
boolean
moveToLast
()
{
// TODO
return
false
;
}
@Override
public
boolean
moveToNext
()
{
// TODO
return
false
;
}
@Override
public
boolean
moveToPosition
(
int
position
)
{
// TODO
return
false
;
}
@Override
public
boolean
moveToPrevious
()
{
// TODO
return
false
;
}
@Override
public
void
registerContentObserver
(
ContentObserver
observer
)
{
// TODO
}
@Override
public
Bundle
respond
(
Bundle
extras
)
{
// TODO
return
null
;
}
@Override
public
void
setNotificationUri
(
ContentResolver
cr
,
Uri
uri
)
{
// TODO
}
@Override
public
void
unregisterContentObserver
(
ContentObserver
observer
)
{
// TODO
}
@Override
public
void
unregisterDataSetObserver
(
DataSetObserver
observer
)
{
// TODO
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2CursorDriver.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
android.database.Cursor
;
/**
* A factory and event listener for cursors.
*/
public
interface
H2CursorDriver
{
/**
* The cursor was closed.
*/
void
cursorClosed
();
/**
* The cursor was deactivated.
*/
void
cursorDeactivated
();
/**
* The query was re-run.
*
* @param cursor the old cursor
*/
void
cursorRequeried
(
Cursor
cursor
);
/**
* Execute the query.
*
* @param factory the cursor factory
* @param bindArgs the parameter values
* @return the cursor
*/
Cursor
query
(
H2Database
.
CursorFactory
factory
,
String
[]
bindArgs
);
/**
* Set the parameter values.
*
* @param bindArgs the parameter values.
*/
void
setBindArguments
(
String
[]
bindArgs
);
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Database.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.Locale
;
import
java.util.Map
;
import
org.h2.command.Prepared
;
import
org.h2.engine.ConnectionInfo
;
import
org.h2.engine.Database
;
import
org.h2.engine.Session
;
import
org.h2.expression.Parameter
;
import
org.h2.result.ResultInterface
;
import
org.h2.value.Value
;
import
org.h2.value.ValueInt
;
import
org.h2.value.ValueLong
;
import
org.h2.value.ValueNull
;
import
org.h2.value.ValueString
;
import
android.content.ContentValues
;
import
android.database.Cursor
;
/**
* This class represents a database connection.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2Database
{
/**
* When a conflict occurs, abort the current statement, but don't roll back
* the transaction. This is the default value.
*/
public
static
final
int
CONFLICT_ABORT
=
2
;
/**
* When a conflict occurs, return SQLITE_CONSTRAINT, but don't roll back the
* transaction.
*/
public
static
final
int
CONFLICT_FAIL
=
3
;
/**
* When a conflict occurs, continue, but don't modify the conflicting row.
*/
public
static
final
int
CONFLICT_IGNORE
=
4
;
/**
* When a conflict occurs, do nothing.
*/
public
static
final
int
CONFLICT_NONE
=
0
;
/**
* When a conflict occurs, the existing rows are replaced.
*/
public
static
final
int
CONFLICT_REPLACE
=
5
;
/**
* When a conflict occurs, the transaction is rolled back.
*/
public
static
final
int
CONFLICT_ROLLBACK
=
1
;
/**
* Create a new database if it doesn't exist.
*/
public
static
final
int
CREATE_IF_NECESSARY
=
0x10000000
;
/**
* This flag has no effect.
*/
public
static
final
int
NO_LOCALIZED_COLLATORS
=
0x10
;
/**
* Open the database in read-only mode.
*/
public
static
final
int
OPEN_READONLY
=
1
;
/**
* Open the database in read-write mode (default).
*/
public
static
final
int
OPEN_READWRITE
=
0
;
private
final
Session
session
;
private
final
CursorFactory
factory
;
H2Database
(
Session
session
,
CursorFactory
factory
)
{
this
.
factory
=
factory
;
this
.
session
=
session
;
}
/**
* Create a new in-memory database.
*
* @param factory the cursor factory
* @return a connection to this database
*/
public
static
H2Database
create
(
H2Database
.
CursorFactory
factory
)
{
ConnectionInfo
ci
=
new
ConnectionInfo
(
"mem:"
);
Database
db
=
new
Database
(
ci
,
null
);
Session
s
=
db
.
getSystemSession
();
return
new
H2Database
(
s
,
factory
);
}
/**
* Open a connection to the given database.
*
* @param path the database file name
* @param factory the cursor factory
* @param flags 0, or a combination of OPEN_READONLY and CREATE_IF_NECESSARY
* @return a connection to this database
*/
public
static
H2Database
openDatabase
(
String
path
,
H2Database
.
CursorFactory
factory
,
int
flags
)
{
ConnectionInfo
ci
=
new
ConnectionInfo
(
path
);
if
((
flags
&
OPEN_READWRITE
)
!=
0
)
{
// TODO readonly connections
}
if
((
flags
&
CREATE_IF_NECESSARY
)
==
0
)
{
ci
.
setProperty
(
"IFEXISTS"
,
"TRUE"
);
}
ci
.
setProperty
(
"FILE_LOCK"
,
"FS"
);
Database
db
=
new
Database
(
ci
,
null
);
Session
s
=
db
.
getSystemSession
();
return
new
H2Database
(
s
,
factory
);
}
/**
* Open a connection to the given database. The database is created if it
* doesn't exist yet.
*
* @param file the database file
* @param factory the cursor factory
* @return a connection to this database
*/
public
static
H2Database
openOrCreateDatabase
(
File
file
,
H2Database
.
CursorFactory
factory
)
{
return
openDatabase
(
file
.
getPath
(),
factory
,
CREATE_IF_NECESSARY
);
}
/**
* Open a connection to the given database. The database is created if it
* doesn't exist yet.
*
* @param path the database file name
* @param factory the cursor factory
* @return a connection to this database
*/
public
static
H2Database
openOrCreateDatabase
(
String
path
,
H2Database
.
CursorFactory
factory
)
{
return
openDatabase
(
path
,
factory
,
CREATE_IF_NECESSARY
);
}
/**
* Start a transaction.
*/
public
void
beginTransaction
()
{
session
.
setAutoCommit
(
false
);
}
/**
* Start a transaction.
*
* @param transactionListener the transaction listener to use
*/
public
void
beginTransactionWithListener
(
H2TransactionListener
transactionListener
)
{
// TODO H2TransactionListener
session
.
setAutoCommit
(
false
);
}
/**
* Close the connection.
*/
public
void
close
()
{
session
.
close
();
}
/**
* Prepare a statement.
*
* @param sql the statement
* @return the prepared statement
*/
public
H2Statement
compileStatement
(
String
sql
)
{
return
new
H2Statement
(
session
.
prepare
(
sql
));
}
/**
* Delete a number of rows in this database.
*
* @param table the table
* @param whereClause the condition
* @param whereArgs the parameter values
* @return the number of rows deleted
*/
public
int
delete
(
String
table
,
String
whereClause
,
String
[]
whereArgs
)
{
return
0
;
}
/**
* End the transaction.
*/
public
void
endTransaction
()
{
// TODO
}
/**
* Execute the given statement.
*
* @param sql the statement
* @param bindArgs the parameter values
*/
public
void
execSQL
(
String
sql
,
Object
[]
bindArgs
)
{
prepare
(
sql
,
bindArgs
).
update
();
}
/**
* Execute the given statement.
*
* @param sql the statement
*/
public
void
execSQL
(
String
sql
)
{
session
.
prepare
(
sql
).
update
();
}
/**
* TODO
*
* @param tables the list of tables
* @return TODO
*/
public
static
String
findEditTable
(
String
tables
)
{
// TODO
return
null
;
}
/**
* Get the maximum size of the database file in bytes.
*
* @return the maximum size
*/
public
long
getMaximumSize
()
{
return
Long
.
MAX_VALUE
;
}
/**
* Get the page size of the database in bytes.
*
* @return the page size
*/
public
long
getPageSize
()
{
return
0
;
}
/**
* Get the name of the database file.
*
* @return the database file name
*/
public
String
getPath
()
{
return
null
;
}
/**
* TODO
*
* @return TODO
*/
public
Map
<
String
,
String
>
getSyncedTables
()
{
return
null
;
}
/**
* Get the database version.
*
* @return the database version
*/
public
int
getVersion
()
{
return
0
;
}
/**
* Check if there is an open transaction.
*
* @return true if there is
*/
public
boolean
inTransaction
()
{
return
false
;
}
/**
* Insert a row.
*
* @param table the table
* @param nullColumnHack not used
* @param values the values
* @return TODO
*/
public
long
insert
(
String
table
,
String
nullColumnHack
,
ContentValues
values
)
{
return
0
;
}
/**
* Try to insert a row.
*
* @param table the table
* @param nullColumnHack not used
* @param values the values
* @return TODO
*/
public
long
insertOrThrow
(
String
table
,
String
nullColumnHack
,
ContentValues
values
)
{
return
0
;
}
/**
* Try to insert a row, using the given conflict resolution option.
*
* @param table the table
* @param nullColumnHack not used
* @param initialValues the values
* @param conflictAlgorithm what conflict resolution to use
* @return TODO
*/
public
long
insertWithOnConflict
(
String
table
,
String
nullColumnHack
,
ContentValues
initialValues
,
int
conflictAlgorithm
)
{
return
0
;
}
/**
* Check if the database is locked by the current thread.
*
* @return true if it is
*/
public
boolean
isDbLockedByCurrentThread
()
{
return
false
;
}
/**
* Check if the database is locked by a different thread.
*
* @return true if it is
*/
public
boolean
isDbLockedByOtherThreads
()
{
return
false
;
}
/**
* Check if the connection is open.
*
* @return true if it is
*/
public
boolean
isOpen
()
{
return
false
;
}
/**
* Check if the connection is read-only.
*
* @return true if it is
*/
public
boolean
isReadOnly
()
{
return
false
;
}
/**
* TODO
*
* @param table the table
* @param deletedTable TODO
*/
public
void
markTableSyncable
(
String
table
,
String
deletedTable
)
{
// TODO
}
/**
* TODO
*
* @param table the table
* @param foreignKey the foreign key
* @param updateTable TODO
*/
public
void
markTableSyncable
(
String
table
,
String
foreignKey
,
String
updateTable
)
{
// TODO
}
/**
* Check if an upgrade is required.
*
* @param newVersion the new version
* @return true if the current version doesn't match
*/
public
boolean
needUpgrade
(
int
newVersion
)
{
return
false
;
}
/**
* Execute the SELECT statement for the given parameters.
*
* @param distinct if only distinct rows should be returned
* @param table the table
* @param columns the list of columns
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @param limit the limit or null
* @return the cursor
*/
public
Cursor
query
(
boolean
distinct
,
String
table
,
String
[]
columns
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
,
String
orderBy
,
String
limit
)
{
return
null
;
}
/**
* Execute the SELECT statement for the given parameters.
*
* @param table the table
* @param columns the list of columns
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @return the cursor
*/
public
Cursor
query
(
String
table
,
String
[]
columns
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
,
String
orderBy
)
{
return
null
;
}
/**
* Execute the SELECT statement for the given parameters.
*
* @param table the table
* @param columns the list of columns
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @param limit the limit or null
* @return the cursor
*/
public
Cursor
query
(
String
table
,
String
[]
columns
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
,
String
orderBy
,
String
limit
)
{
return
null
;
}
/**
* Execute the SELECT statement for the given parameters.
*
* @param cursorFactory the cursor factory to use
* @param distinct if only distinct rows should be returned
* @param table the table
* @param columns the list of columns
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @param limit the limit or null
* @return the cursor
*/
public
Cursor
queryWithFactory
(
H2Database
.
CursorFactory
cursorFactory
,
boolean
distinct
,
String
table
,
String
[]
columns
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
,
String
orderBy
,
String
limit
)
{
return
null
;
}
/**
* Execute the query.
*
* @param sql the SQL statement
* @param selectionArgs the parameter values
* @return the cursor
*/
public
Cursor
rawQuery
(
String
sql
,
String
[]
selectionArgs
)
{
Prepared
prep
=
prepare
(
sql
,
selectionArgs
);
ResultInterface
result
=
prep
.
query
(
0
);
return
new
H2Cursor
(
result
);
}
/**
* Execute the query using the given cursor factory.
*
* @param cursorFactory the cursor factory
* @param sql the SQL statement
* @param selectionArgs the parameter values
* @param editTable TODO
* @return the cursor
*/
public
Cursor
rawQueryWithFactory
(
H2Database
.
CursorFactory
cursorFactory
,
String
sql
,
String
[]
selectionArgs
,
String
editTable
)
{
return
null
;
}
/**
* Try to release memory.
*
* @return TODO
*/
public
static
int
releaseMemory
()
{
return
0
;
}
/**
* Replace an existing row in the database.
*
* @param table the table
* @param nullColumnHack ignored
* @param initialValues the values
* @return TODO
*/
public
long
replace
(
String
table
,
String
nullColumnHack
,
ContentValues
initialValues
)
{
return
0
;
}
/**
* Try to replace an existing row in the database.
*
* @param table the table
* @param nullColumnHack ignored
* @param initialValues the values
* @return TODO
*/
public
long
replaceOrThrow
(
String
table
,
String
nullColumnHack
,
ContentValues
initialValues
)
{
return
0
;
}
/**
* Set the locale.
*
* @param locale the new locale
*/
public
void
setLocale
(
Locale
locale
)
{
// TODO
}
/**
* Enable or disable thread safety.
*
* @param lockingEnabled the new value
*/
public
void
setLockingEnabled
(
boolean
lockingEnabled
)
{
// TODO
}
/**
* Set the maximum database file size.
*
* @param numBytes the file size in bytes
* @return the effective maximum size
*/
public
long
setMaximumSize
(
long
numBytes
)
{
return
0
;
}
/**
* Set the database page size. The value can not be changed once the
* database exists.
*
* @param numBytes the page size
*/
public
void
setPageSize
(
long
numBytes
)
{
// TODO
}
/**
* Mark the transaction as completed successfully.
*/
public
void
setTransactionSuccessful
()
{
// TODO
}
/**
* Update the database version.
*
* @param version the version
*/
public
void
setVersion
(
int
version
)
{
// TODO
}
/**
* Update one or multiple rows.
*
* @param table the table
* @param values the values
* @param whereClause the where condition
* @param whereArgs the parameter values
* @return the number of rows updated
*/
public
int
update
(
String
table
,
ContentValues
values
,
String
whereClause
,
String
[]
whereArgs
)
{
return
0
;
}
/**
* Update one or multiple rows.
*
* @param table the table
* @param values the values
* @param whereClause the where condition
* @param whereArgs the parameter values
* @param conflictAlgorithm the conflict resolution option
* @return the number of rows updated
*/
public
int
updateWithOnConflict
(
String
table
,
ContentValues
values
,
String
whereClause
,
String
[]
whereArgs
,
int
conflictAlgorithm
)
{
return
0
;
}
/**
* TODO
*
* @deprecated deprecated in API Level 3, use yieldIfContendedSafely
* @return TODO
*/
@Deprecated
public
boolean
yieldIfContended
()
{
return
false
;
}
/**
* Temporarily pause the transaction.
*
* @param sleepAfterYieldDelay TODO
* @return TODO
*/
public
boolean
yieldIfContendedSafely
(
long
sleepAfterYieldDelay
)
{
return
false
;
}
/**
* Temporarily pause the transaction.
*
* @return TODO
*/
public
boolean
yieldIfContendedSafely
()
{
return
false
;
}
/**
* The cursor factory.
*/
public
interface
CursorFactory
{
/**
* Create a new cursor.
*
* @param db the connection
* @param masterQuery TODO
* @param editTable TODO
* @param query TODO
* @return the cursor
*/
Cursor
newCursor
(
H2Database
db
,
H2CursorDriver
masterQuery
,
String
editTable
,
H2Query
query
);
}
private
Prepared
prepare
(
String
sql
,
Object
[]
args
)
{
Prepared
prep
=
session
.
prepare
(
sql
);
int
len
=
args
.
length
;
if
(
len
>
0
)
{
ArrayList
<
Parameter
>
params
=
prep
.
getParameters
();
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Parameter
p
=
params
.
get
(
i
);
p
.
setValue
(
getValue
(
args
[
i
]));
}
}
return
prep
;
}
private
static
Value
getValue
(
Object
o
)
{
if
(
o
==
null
)
{
return
ValueNull
.
INSTANCE
;
}
else
if
(
o
instanceof
String
)
{
return
ValueString
.
get
((
String
)
o
);
}
else
if
(
o
instanceof
Integer
)
{
return
ValueInt
.
get
((
Integer
)
o
);
}
else
if
(
o
instanceof
Long
)
{
return
ValueLong
.
get
((
Integer
)
o
);
}
return
ValueString
.
get
(
o
.
toString
());
// TODO
}
/**
* Create a new RuntimeException that says this feature is not supported.
*
* @return the runtime exception
*/
public
static
RuntimeException
unsupported
()
{
// TODO
return
new
RuntimeException
(
"Feature not supported"
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2DatabaseCorruptException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* This exception is thrown when the database file is corrupt.
*/
public
class
H2DatabaseCorruptException
extends
H2Exception
{
private
static
final
long
serialVersionUID
=
1L
;
H2DatabaseCorruptException
()
{
super
();
}
H2DatabaseCorruptException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2DiskIOException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* This exception is thrown when there was a IO exception.
*/
public
class
H2DiskIOException
extends
H2Exception
{
private
static
final
long
serialVersionUID
=
1L
;
H2DiskIOException
()
{
super
();
}
H2DiskIOException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2DoneException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* This exception is thrown the requested data is not available, for example
* when calling simpleQueryForString() or simpleQueryForLong() for a statement
* that doesn't return a value.
*/
public
class
H2DoneException
extends
H2Exception
{
private
static
final
long
serialVersionUID
=
1L
;
H2DoneException
()
{
super
();
}
H2DoneException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Exception.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
android.database.SQLException
;
/**
* This exception is thrown when there is a syntax error or similar problem.
*/
public
class
H2Exception
extends
SQLException
{
private
static
final
long
serialVersionUID
=
1L
;
public
H2Exception
()
{
super
();
}
public
H2Exception
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2FullException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* This exception is thrown when the database file is full and can't grow.
*/
public
class
H2FullException
extends
H2Exception
{
private
static
final
long
serialVersionUID
=
1L
;
H2FullException
()
{
super
();
}
H2FullException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2MisuseException.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* TODO
*/
public
class
H2MisuseException
extends
H2Exception
{
private
static
final
long
serialVersionUID
=
1L
;
H2MisuseException
()
{
super
();
}
H2MisuseException
(
String
error
)
{
super
(
error
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2OpenHelper.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
android.content.Context
;
/**
* This helper class helps creating and managing databases. A subclass typically
* implements the "on" methods.
*/
@SuppressWarnings
(
"unused"
)
public
abstract
class
H2OpenHelper
{
/**
* Construct a new instance.
*
* @param context the context to use
* @param name the name of the database (use null for an in-memory database)
* @param factory the cursor factory to use
* @param version the expected database version
*/
H2OpenHelper
(
Context
context
,
String
name
,
H2Database
.
CursorFactory
factory
,
int
version
)
{
// TODO
}
/**
* Close the connection.
*/
public
synchronized
void
close
()
{
// TODO
}
/**
* Open a read-only connection.
*
* @return a new read-only connection
*/
public
synchronized
H2Database
getReadableDatabase
()
{
return
null
;
}
/**
* Open a read-write connection.
*
* @return a new read-write connection
*/
public
synchronized
H2Database
getWritableDatabase
()
{
return
null
;
}
/**
* This method is called when the database did not already exist.
*
* @param db the connection
*/
public
abstract
void
onCreate
(
H2Database
db
);
/**
* This method is called after opening the database.
*
* @param db the connection
*/
public
void
onOpen
(
H2Database
db
)
{
// TODO
}
/**
* This method is called when the version stored in the database file does
* not match the expected value.
*
* @param db the connection
* @param oldVersion the current version
* @param newVersion the expected version
*/
public
abstract
void
onUpgrade
(
H2Database
db
,
int
oldVersion
,
int
newVersion
);
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Program.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
org.h2.command.Prepared
;
import
org.h2.expression.Parameter
;
import
org.h2.value.ValueBytes
;
/**
* This class represents a prepared statement.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2Program
extends
H2Closable
{
/**
* The prepared statement
*/
protected
final
Prepared
prepared
;
H2Program
(
Prepared
prepared
)
{
this
.
prepared
=
prepared
;
}
/**
* Set the specified parameter value.
*
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
public
void
bindBlob
(
int
index
,
byte
[]
value
)
{
getParameter
(
index
).
setValue
(
ValueBytes
.
get
(
value
));
}
/**
* Set the specified parameter value.
*
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
public
void
bindDouble
(
int
index
,
double
value
)
{
// TODO
}
/**
* Set the specified parameter value.
*
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
public
void
bindLong
(
int
index
,
long
value
)
{
// TODO
}
/**
* Set the specified parameter to NULL.
*
* @param index the parameter index (0, 1,...)
*/
public
void
bindNull
(
int
index
)
{
// TODO
}
/**
* Set the specified parameter value.
*
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
public
void
bindString
(
int
index
,
String
value
)
{
// TODO
}
/**
* Reset all parameter values.
*/
public
void
clearBindings
()
{
// TODO
}
/**
* Close the statement.
*/
public
void
close
()
{
// TODO
}
/**
* Get the unique id of this statement.
*
* @return the id
*/
public
final
int
getUniqueId
()
{
return
0
;
}
/**
* TODO
*/
@Override
protected
void
onAllReferencesReleased
()
{
// TODO
}
/**
* TODO
*/
@Override
protected
void
onAllReferencesReleasedFromContainer
()
{
// TODO
}
private
Parameter
getParameter
(
int
index
)
{
return
prepared
.
getParameters
().
get
(
index
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Query.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
org.h2.command.Prepared
;
/**
* This class represents a prepared statement that returns a result set.
*/
public
class
H2Query
extends
H2Program
{
H2Query
(
Prepared
prepared
)
{
super
(
prepared
);
}
/**
* Set the specified parameter value.
*
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
@Override
public
void
bindDouble
(
int
index
,
double
value
)
{
// TODO
}
/**
* Set the specified parameter value.
*
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
@Override
public
void
bindLong
(
int
index
,
long
value
)
{
// TODO
}
/**
* Set the specified parameter to NULL.
*
* @param index the parameter index (0, 1,...)
*/
@Override
public
void
bindNull
(
int
index
)
{
// TODO
}
/**
* Set the specified parameter value.
*
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
@Override
public
void
bindString
(
int
index
,
String
value
)
{
// TODO
}
/**
* Close the statement.
*/
@Override
public
void
close
()
{
// TODO
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2QueryBuilder.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
java.util.Map
;
import
java.util.Set
;
import
org.h2.util.StringUtils
;
import
android.database.Cursor
;
/**
* This helper class is used to build SQL statements.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2QueryBuilder
{
private
H2Database
.
CursorFactory
factory
;
private
boolean
distinct
;
private
String
tables
;
private
Map
<
String
,
String
>
columnMap
;
/**
* Append the column to the string builder. The columns are separated by
* comma.
*
* @param s the target string builder
* @param columns the columns
*/
static
void
appendColumns
(
StringBuilder
s
,
String
[]
columns
)
{
for
(
int
i
=
0
;
i
<
columns
.
length
;
i
++)
{
if
(
i
>
0
)
{
s
.
append
(
", "
);
}
s
.
append
(
StringUtils
.
quoteIdentifier
(
columns
[
i
]));
}
}
/**
* Return the SELECT statement for the given parameters.
*
* @param distinct if only distinct rows should be returned
* @param tables the list of tables
* @param columns the list of columns
* @param where the where condition or null
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @param limit the limit or null
* @return the query
*/
static
String
buildQueryString
(
boolean
distinct
,
String
tables
,
String
[]
columns
,
String
where
,
String
groupBy
,
String
having
,
String
orderBy
,
String
limit
)
{
StringBuilder
s
=
new
StringBuilder
();
s
.
append
(
"select "
);
if
(
distinct
)
{
s
.
append
(
"distinct "
);
}
appendColumns
(
s
,
columns
);
s
.
append
(
" from "
).
append
(
tables
);
if
(
where
!=
null
)
{
s
.
append
(
" where "
).
append
(
where
);
}
if
(
groupBy
!=
null
)
{
s
.
append
(
" group by "
).
append
(
groupBy
);
}
if
(
having
!=
null
)
{
s
.
append
(
" having "
).
append
(
having
);
}
if
(
orderBy
!=
null
)
{
s
.
append
(
" order by "
).
append
(
groupBy
);
}
if
(
limit
!=
null
)
{
s
.
append
(
" limit "
).
append
(
limit
);
}
return
s
.
toString
();
}
/**
* Append the text to the where clause.
*
* @param inWhere the text to append
*/
void
appendWhere
(
CharSequence
inWhere
)
{
// TODO
}
/**
* Append the text to the where clause. The text is escaped.
*
* @param inWhere the text to append
*/
void
appendWhereEscapeString
(
String
inWhere
)
{
// TODO how to escape
}
/**
* Return the SELECT UNION statement for the given parameters.
*
* @param projectionIn TODO
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @param limit the limit or null
* @return the query
*/
String
buildQuery
(
String
[]
projectionIn
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
,
String
orderBy
,
String
limit
)
{
return
null
;
}
/**
* Return the SELECT UNION statement for the given parameters.
*
* @param subQueries TODO
* @param orderBy the order by list or null
* @param limit the limit or null
* @return the query
*/
String
buildUnionQuery
(
String
[]
subQueries
,
String
orderBy
,
String
limit
)
{
return
null
;
}
/**
* Return the SELECT UNION statement for the given parameters.
*
* @param typeDiscriminatorColumn TODO
* @param unionColumns TODO
* @param columnsPresentInTable TODO
* @param computedColumnsOffset TODO
* @param typeDiscriminatorValue TODO
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @return the query
*/
String
buildUnionSubQuery
(
String
typeDiscriminatorColumn
,
String
[]
unionColumns
,
Set
<
String
>
columnsPresentInTable
,
int
computedColumnsOffset
,
String
typeDiscriminatorValue
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
)
{
return
null
;
}
/**
* Get the list of tables.
*
* @return the list of tables
*/
String
getTables
()
{
return
tables
;
}
/**
* Run the query for the given parameters.
*
* @param db the connection
* @param projectionIn TODO
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @return the cursor
*/
Cursor
query
(
H2Database
db
,
String
[]
projectionIn
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
,
String
orderBy
)
{
return
null
;
}
/**
* Run the query for the given parameters.
*
* @param db the connection
* @param projectionIn TODO
* @param selection TODO
* @param selectionArgs TODO
* @param groupBy the group by list or null
* @param having the having condition or null
* @param orderBy the order by list or null
* @param limit the limit or null
* @return the cursor
*/
Cursor
query
(
H2Database
db
,
String
[]
projectionIn
,
String
selection
,
String
[]
selectionArgs
,
String
groupBy
,
String
having
,
String
orderBy
,
String
limit
)
{
return
null
;
}
/**
* Set the cursor factory.
*
* @param factory the new value
*/
void
setCursorFactory
(
H2Database
.
CursorFactory
factory
)
{
this
.
factory
=
factory
;
}
/**
* Enable or disable the DISTINCT flag.
*
* @param distinct the new value
*/
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
/**
* TODO
*
* @param columnMap TODO
*/
void
setProjectionMap
(
Map
<
String
,
String
>
columnMap
)
{
this
.
columnMap
=
columnMap
;
}
/**
* Set the list of tables.
*
* @param inTables the list of tables
*/
void
setTables
(
String
inTables
)
{
this
.
tables
=
inTables
;
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Statement.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
import
org.h2.command.Prepared
;
import
org.h2.result.ResultInterface
;
import
org.h2.value.Value
;
import
org.h2.value.ValueNull
;
/**
* Represents a prepared statement.
*/
public
class
H2Statement
extends
H2Program
{
H2Statement
(
Prepared
prepared
)
{
super
(
prepared
);
}
/**
* Execute the statement.
*/
public
void
execute
()
{
if
(
prepared
.
isQuery
())
{
prepared
.
query
(
0
);
}
else
{
prepared
.
update
();
}
}
/**
* Execute the insert statement and return the id of the inserted row.
*
* @return the id of the inserted row
*/
public
long
executeInsert
()
{
return
prepared
.
update
();
}
/**
* Execute the query and return the value of the first column and row as a
* long.
*
* @return the value
*/
public
long
simpleQueryForLong
()
{
return
simpleQuery
().
getLong
();
}
/**
* Execute the query and return the value of the first column and row as a
* string.
*
* @return the value
*/
public
String
simpleQueryForString
()
{
return
simpleQuery
().
getString
();
}
private
Value
simpleQuery
()
{
ResultInterface
result
=
prepared
.
query
(
1
);
try
{
if
(
result
.
next
())
{
Value
[]
row
=
result
.
currentRow
();
if
(
row
.
length
>
0
)
{
return
row
[
0
];
}
}
}
finally
{
result
.
close
();
}
return
ValueNull
.
INSTANCE
;
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2TransactionListener.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* A class that implements this interface can listen to transaction begin and
* end events.
*/
public
interface
H2TransactionListener
{
/**
* The transaction has been started.
*/
void
onBegin
();
/**
* The transaction will be committed.
*/
void
onCommit
();
/**
* The transaction will be rolled back.
*/
void
onRollback
();
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/H2Utils.java
deleted
100644 → 0
浏览文件 @
11b7e7cd
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
android
;
/**
* Utility methods.
*/
public
class
H2Utils
{
/**
* A replacement for Context.openOrCreateDatabase.
*
* @param name the database name
* @param mode the access mode
* @param factory the cursor factory to use
* @return the database connection
*/
public
static
H2Database
openOrCreateDatabase
(
String
name
,
@SuppressWarnings
(
"unused"
)
int
mode
,
H2Database
.
CursorFactory
factory
)
{
return
H2Database
.
openOrCreateDatabase
(
name
,
factory
);
}
}
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/android/package.html
deleted
100644 → 0
浏览文件 @
11b7e7cd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
This package contains the H2 Android database API.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/build/Build.java
浏览文件 @
8c9a2ff1
...
...
@@ -195,11 +195,10 @@ public class Build extends BuildBase {
execJava
(
args
(
"-Xmx128m"
,
"-javaagent:ext/jacocoagent.jar=destfile=coverage/jacoco.exec,"
+
"excludes=org.h2.test.*:org.h2.tools.*:org.h2.sample.*
:android.*
"
,
+
"excludes=org.h2.test.*:org.h2.tools.*:org.h2.sample.*"
,
"-cp"
,
cp
,
"org.h2.test.TestAll"
,
"codeCoverage"
));
// Remove classes that we don't want to include in report
delete
(
files
(
"coverage/bin/android"
));
delete
(
files
(
"coverage/bin/org/h2/test"
));
delete
(
files
(
"coverage/bin/org/h2/tools"
));
delete
(
files
(
"coverage/bin/org/h2/sample"
));
...
...
@@ -520,8 +519,6 @@ public class Build extends BuildBase {
addVersions
(
true
);
manifest
(
"H2 Database Engine"
,
"org.h2.tools.Console"
);
FileList
files
=
files
(
"temp"
).
exclude
(
"temp/android/*"
).
exclude
(
"temp/org/h2/android/*"
).
exclude
(
"temp/org/h2/build/*"
).
exclude
(
"temp/org/h2/dev/*"
).
exclude
(
"temp/org/h2/jcr/*"
).
...
...
@@ -542,37 +539,6 @@ public class Build extends BuildBase {
filter
(
"src/installer/h2w.bat"
,
"bin/h2w.bat"
,
"h2.jar"
,
"h2"
+
getJarSuffix
());
}
/**
* Create the file h2android.jar. This only contains the embedded database,
* plus the H2 Android API. Debug information is disabled.
*/
@Description
(
summary
=
"Create h2android.jar with only the embedded DB and H2 Android API."
)
public
void
jarAndroid
()
{
compile
(
false
,
false
,
true
);
FileList
files
=
files
(
"temp"
).
exclude
(
"temp/org/h2/bnf/*"
).
exclude
(
"temp/org/h2/build/*"
).
exclude
(
"temp/org/h2/dev/*"
).
exclude
(
"temp/org/h2/fulltext/*"
).
exclude
(
"temp/org/h2/java/*"
).
exclude
(
"temp/org/h2/jdbcx/*"
).
exclude
(
"temp/org/h2/jcr/*"
).
exclude
(
"temp/org/h2/jmx/*"
).
exclude
(
"temp/org/h2/mode/*"
).
exclude
(
"temp/org/h2/samples/*"
).
exclude
(
"temp/org/h2/server/*"
).
exclude
(
"temp/org/h2/test/*"
).
exclude
(
"temp/org/h2/tools/*"
).
exclude
(
"*.bat"
).
exclude
(
"*.sh"
).
exclude
(
"*.txt"
).
exclude
(
"*.DS_Store"
);
files
=
excludeTestMetaInfFiles
(
files
);
files
.
add
(
new
File
(
"temp/org/h2/tools/DeleteDbFiles.class"
));
files
.
add
(
new
File
(
"temp/org/h2/tools/CompressTool.class"
));
jar
(
"bin/h2android"
+
getJarSuffix
(),
files
,
"temp"
);
}
/**
* Create the h2client.jar. This only contains the remote JDBC
* implementation.
...
...
@@ -623,8 +589,6 @@ public class Build extends BuildBase {
compile
(
false
,
false
,
true
);
addVersions
(
true
);
FileList
files
=
files
(
"temp"
).
exclude
(
"temp/android/*"
).
exclude
(
"temp/org/h2/android/*"
).
exclude
(
"temp/org/h2/build/*"
).
exclude
(
"temp/org/h2/dev/*"
).
exclude
(
"temp/org/h2/jcr/*"
).
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论