ソースを参照

minor tweaks to date handling; clear caches when config updated; ensure date formats have correct symbols

git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1234 f203690c-595d-4dc9-a70b-905162fa7fd2
tags/jackcess-2.2.1
James Ahlborn 5年前
コミット
cd6d6e622c

+ 1
- 1
src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java ファイルの表示

return ((value instanceof Double) ? value : return ((value instanceof Double) ? value :
toNumber(value, db).doubleValue()); toNumber(value, db).doubleValue());
case SHORT_DATE_TIME: case SHORT_DATE_TIME:
return ((value instanceof DateExt) ? value :
return ((value instanceof Date) ? value :
new Date(toDateLong(value))); new Date(toDateLong(value)));
case TEXT: case TEXT:
case MEMO: case MEMO:

+ 10
- 4
src/main/java/com/healthmarketscience/jackcess/impl/DBEvalContext.java ファイルの表示

private final RandomContext _rndCtx = new RandomContext(); private final RandomContext _rndCtx = new RandomContext();
private Bindings _bindings = new SimpleBindings(); private Bindings _bindings = new SimpleBindings();


public DBEvalContext(DatabaseImpl db)
{
public DBEvalContext(DatabaseImpl db) {
_db = db; _db = db;
} }


} }


public void setTemporalConfig(TemporalConfig temporal) { public void setTemporalConfig(TemporalConfig temporal) {
_temporal = temporal;
if(_temporal != temporal) {
_temporal = temporal;
_sdfs = null;
}
} }


public Calendar getCalendar() { public Calendar getCalendar() {
} }


public void setNumericConfig(NumericConfig numeric) { public void setNumericConfig(NumericConfig numeric) {
_numeric = numeric;
if(_numeric != numeric) {
_numeric = numeric;
_dfs = null;
}
} }


public FunctionLookup getFunctionLookup() { public FunctionLookup getFunctionLookup() {
SimpleDateFormat sdf = _sdfs.get(formatStr); SimpleDateFormat sdf = _sdfs.get(formatStr);
if(sdf == null) { if(sdf == null) {
sdf = _db.createDateFormat(formatStr); sdf = _db.createDateFormat(formatStr);
sdf.setDateFormatSymbols(_temporal.getDateFormatSymbols());
_sdfs.put(formatStr, sdf); _sdfs.put(formatStr, sdf);
} }
return sdf; return sdf;

読み込み中…
キャンセル
保存