com.sap.cds.jdbc.h2.H2DbContext Maven / Gradle / Ivy
/************************************************************************
* © 2020-2022 SAP SE or an SAP affiliate company. All rights reserved. *
************************************************************************/
package com.sap.cds.jdbc.h2;
import com.sap.cds.CdsDataStoreConnector.Capabilities;
import com.sap.cds.DataStoreConfiguration;
import com.sap.cds.jdbc.generic.GenericDbContext;
import com.sap.cds.jdbc.spi.ExceptionAnalyzer;
import com.sap.cds.jdbc.spi.FunctionMapper;
import com.sap.cds.jdbc.spi.StatementResolver;
public final class H2DbContext extends GenericDbContext {
public H2DbContext(DataStoreConfiguration dataStoreConfiguration) {
super(dataStoreConfiguration);
}
@Override
public FunctionMapper getFunctionMapper() {
return new H2FunctionMapper();
}
@Override
public StatementResolver getStatementResolver() {
return new H2StatementResolver();
}
@Override
public ExceptionAnalyzer getExceptionAnalyzer() {
return new H2ExceptionAnalyzer();
}
@Override
public Capabilities getCapabilities() {
return new H2Capabilities();
}
class H2Capabilities implements Capabilities {
@Override
public int timestampPrecision() {
return 6;
}
}
}