git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1325 f203690c-595d-4dc9-a70b-905162fa7fd2tags/jackcess-3.5.0
@@ -15,6 +15,9 @@ | |||
<action dev="jahlborn" type="update"> | |||
Enabled expression evaluation by default. | |||
</action> | |||
<action dev="jahlborn" type="update"> | |||
Change the default DateTimeType to LOCAL_DATE_TIME. | |||
</action> | |||
</release> | |||
<release version="3.0.1" date="2019-04-13"> | |||
<action dev="jahlborn" type="update"> |
@@ -2115,13 +2115,13 @@ public class DatabaseImpl implements Database, DateTimeContext | |||
/** | |||
* Returns the default DateTimeType. This defaults to | |||
* {@link DateTimeType#DATE}, but can be overridden using the system | |||
* {@link DateTimeType#LOCAL_DATE_TIME}, but can be overridden using the system | |||
* property {@value com.healthmarketscience.jackcess.Database#DATE_TIME_TYPE_PROPERTY}. | |||
* @usage _advanced_method_ | |||
*/ | |||
public static DateTimeType getDefaultDateTimeType() { | |||
return getEnumSystemProperty(DateTimeType.class, DATE_TIME_TYPE_PROPERTY, | |||
DateTimeType.DATE); | |||
DateTimeType.LOCAL_DATE_TIME); | |||
} | |||
/** |
@@ -51,6 +51,7 @@ public class ComplexColumnTest extends TestCase | |||
{ | |||
for(final TestDB testDB : TestDB.getSupportedForBasename(Basename.COMPLEX)) { | |||
Database db = openCopy(testDB); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
db.setTimeZone(TEST_TZ); | |||
Table t1 = db.getTable("Table1"); |
@@ -160,6 +160,8 @@ public class DatabaseTest extends TestCase | |||
public void testGetNextRow() throws Exception { | |||
for (final TestDB testDB : SUPPORTED_DBS_TEST_FOR_READ) { | |||
final Database db = open(testDB); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
assertEquals(4, db.getTableNames().size()); | |||
final Table table = db.getTable("Table1"); | |||
@@ -623,6 +625,7 @@ public class DatabaseTest extends TestCase | |||
public void testWriteAndReadDate() throws Exception { | |||
for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) { | |||
Database db = createMem(fileFormat); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
Table table = new TableBuilder("test") | |||
.addColumn(new ColumnBuilder("name", DataType.TEXT)) | |||
@@ -693,6 +696,7 @@ public class DatabaseTest extends TestCase | |||
for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) { | |||
Database db = createMem(fileFormat); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
db.setTimeZone(tz); | |||
Table table = new TableBuilder("test") | |||
@@ -716,6 +720,7 @@ public class DatabaseTest extends TestCase | |||
for (final TestDB testDB : TestDB.getSupportedForBasename(Basename.OLD_DATES)) { | |||
Database db = openCopy(testDB); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
Table t = db.getTable("Table1"); | |||
@@ -350,6 +350,7 @@ public class IndexTest extends TestCase { | |||
public void testUniqueEntryCount() throws Exception { | |||
for (final TestDB testDB : SUPPORTED_DBS_TEST) { | |||
Database db = openCopy(testDB); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
Table table = db.getTable("Table1"); | |||
IndexImpl indA = (IndexImpl)table.getIndex("PrimaryKey"); | |||
IndexImpl indB = (IndexImpl)table.getIndex("B"); |
@@ -31,6 +31,7 @@ import com.healthmarketscience.jackcess.Cursor; | |||
import com.healthmarketscience.jackcess.CursorBuilder; | |||
import com.healthmarketscience.jackcess.DataType; | |||
import com.healthmarketscience.jackcess.Database; | |||
import com.healthmarketscience.jackcess.DateTimeType; | |||
import com.healthmarketscience.jackcess.Index; | |||
import com.healthmarketscience.jackcess.Row; | |||
import com.healthmarketscience.jackcess.Table; | |||
@@ -65,6 +66,7 @@ public class IndexCodesTest extends TestCase { | |||
{ | |||
for (final TestDB testDB : TestDB.getSupportedForBasename(Basename.INDEX_CODES, true)) { | |||
Database db = openMem(testDB); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
for(Table t : db) { | |||
for(Index index : t.getIndexes()) { |
@@ -26,6 +26,7 @@ import static com.healthmarketscience.jackcess.Database.*; | |||
import com.healthmarketscience.jackcess.ColumnBuilder; | |||
import com.healthmarketscience.jackcess.DataType; | |||
import com.healthmarketscience.jackcess.Database; | |||
import com.healthmarketscience.jackcess.DateTimeType; | |||
import com.healthmarketscience.jackcess.Table; | |||
import com.healthmarketscience.jackcess.TableBuilder; | |||
import com.healthmarketscience.jackcess.impl.JetFormatTest; | |||
@@ -52,6 +53,7 @@ public class ExportTest extends TestCase | |||
for (final FileFormat fileFormat : JetFormatTest.SUPPORTED_FILEFORMATS) { | |||
Database db = create(fileFormat); | |||
db.setDateTimeType(DateTimeType.DATE); | |||
db.setTimeZone(TEST_TZ); | |||
Table t = new TableBuilder("test") |