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 java.sql.SQLException;
09:
10: import org.openrdf.sail.rdbms.schema.RdbmsTable;
11:
12: /**
13: * Converts table names to lower-case and include the analyse optimisation.
14: *
15: * @author James Leigh
16: *
17: */
18: public class PgSqlTable extends RdbmsTable {
19:
20: public PgSqlTable(String name) {
21: super (name.toLowerCase());
22: }
23:
24: @Override
25: protected String buildLongIndex(String... columns) {
26: // TODO How can we index text columns?
27: return null;
28: }
29:
30: @Override
31: protected String buildOptimize() throws SQLException {
32: return "VACUUM ANALYZE " + getName();
33: }
34:
35: @Override
36: protected String buildClear() {
37: return "TRUNCATE " + getName();
38: }
39:
40: }
|