All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cds.jdbc.h2.H2DbContext Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
/************************************************************************
 * © 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;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy