01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.rdbms.postgresql.alt;
07:
08: import org.openrdf.sail.rdbms.RdbmsConnectionFactory;
09: import org.openrdf.sail.rdbms.evaluation.QueryBuilderFactory;
10: import org.openrdf.sail.rdbms.optimizers.RdbmsQueryOptimizer;
11: import org.openrdf.sail.rdbms.schema.TableFactory;
12: import org.openrdf.sail.rdbms.schema.ValueTableFactory;
13:
14: /**
15: * Overrides {@link ValueTableFactory}, {@link QueryBuilderFactory}, and
16: * {@link RdbmsQueryOptimizer}. This class also indicates that PostgreSQL does
17: * not require a FROM clause.
18: *
19: * @author James Leigh
20: *
21: */
22: public class PgSqlConnectionFactory extends RdbmsConnectionFactory {
23:
24: @Override
25: protected ValueTableFactory createValueTableFactory() {
26: return new PgSqlValueTableFactory();
27: }
28:
29: @Override
30: protected TableFactory createTableFactory() {
31: return new PgSqlTableFactory();
32: }
33:
34: @Override
35: protected QueryBuilderFactory createQueryBuilderFactory() {
36: return new PgQueryBuilderFactory();
37: }
38:
39: @Override
40: protected String getFromDummyTable() {
41: return "";
42: }
43:
44: @Override
45: protected RdbmsQueryOptimizer createOptimizer() {
46: return new PgSqlQueryOptimizer();
47: }
48: }
|