소스 검색

Load linked table info from system table when reading databases with unsupported sort orders. Fixes issue #123

git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@935 f203690c-595d-4dc9-a70b-905162fa7fd2
tags/jackcess-2.1.1
James Ahlborn 9 년 전
부모
커밋
09c42b87bb
2개의 변경된 파일15개의 추가작업 그리고 9개의 파일을 삭제
  1. 6
    0
      src/changes/changes.xml
  2. 9
    9
      src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java

+ 6
- 0
src/changes/changes.xml 파일 보기

@@ -4,6 +4,12 @@
<author email="javajedi@users.sf.net">Tim McCune</author>
</properties>
<body>
<release version="2.1.1" date="TBD">
<action dev="jahlborn" type="fix" system="SourceForge2" issue="123">
Load linked table info from system table when reading databases with
unsupported sort orders.
</action>
</release>
<release version="2.1.0" date="2015-04-16"
description="Relicense to Apache License">
<action dev="jahlborn" type="add">

+ 9
- 9
src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java 파일 보기

@@ -230,12 +230,12 @@ public class DatabaseImpl implements Database
/** the columns to read when reading system catalog normally */
private static Collection<String> SYSTEM_CATALOG_COLUMNS =
new HashSet<String>(Arrays.asList(CAT_COL_NAME, CAT_COL_TYPE, CAT_COL_ID,
CAT_COL_FLAGS, CAT_COL_DATABASE,
CAT_COL_FOREIGN_NAME));
/** the columns to read when finding table names */
private static Collection<String> SYSTEM_CATALOG_TABLE_NAME_COLUMNS =
new HashSet<String>(Arrays.asList(CAT_COL_NAME, CAT_COL_TYPE, CAT_COL_ID,
CAT_COL_FLAGS, CAT_COL_PARENT_ID));
/** the columns to read when finding table details */
private static Collection<String> SYSTEM_CATALOG_TABLE_DETAIL_COLUMNS =
new HashSet<String>(Arrays.asList(CAT_COL_NAME, CAT_COL_TYPE, CAT_COL_ID,
CAT_COL_FLAGS, CAT_COL_PARENT_ID,
CAT_COL_DATABASE, CAT_COL_FOREIGN_NAME));
/** the columns to read when getting object propertyes */
private static Collection<String> SYSTEM_CATALOG_PROPS_COLUMNS =
new HashSet<String>(Arrays.asList(CAT_COL_ID, CAT_COL_PROPS));
@@ -1950,7 +1950,7 @@ public class DatabaseImpl implements Database
throws IOException
{
for(Row row : getTableNamesCursor().newIterable().setColumnNames(
SYSTEM_CATALOG_TABLE_NAME_COLUMNS)) {
SYSTEM_CATALOG_COLUMNS)) {

String tableName = row.getString(CAT_COL_NAME);
int flags = row.getInt(CAT_COL_FLAGS);
@@ -1978,7 +1978,7 @@ public class DatabaseImpl implements Database
public boolean isLinkedTable(Table table) throws IOException
{
for(Row row : getTableNamesCursor().newIterable().setColumnNames(
SYSTEM_CATALOG_COLUMNS)) {
SYSTEM_CATALOG_TABLE_DETAIL_COLUMNS)) {
Short type = row.getShort(CAT_COL_TYPE);
String linkedDbName = row.getString(CAT_COL_DATABASE);
String linkedTableName = row.getString(CAT_COL_FOREIGN_NAME);
@@ -2060,7 +2060,7 @@ public class DatabaseImpl implements Database
}

Row row = _systemCatalogCursor.getCurrentRow(
SYSTEM_CATALOG_COLUMNS);
SYSTEM_CATALOG_TABLE_DETAIL_COLUMNS);
Integer pageNumber = row.getInt(CAT_COL_ID);
String realName = row.getString(CAT_COL_NAME);
int flags = row.getInt(CAT_COL_FLAGS);
@@ -2135,7 +2135,7 @@ public class DatabaseImpl implements Database
public TableInfo lookupTable(String tableName) throws IOException {

for(Row row : _systemCatalogCursor.newIterable().setColumnNames(
SYSTEM_CATALOG_TABLE_NAME_COLUMNS)) {
SYSTEM_CATALOG_TABLE_DETAIL_COLUMNS)) {

Short type = row.getShort(CAT_COL_TYPE);
if(!isTableType(type)) {

Loading…
취소
저장