01: /*
02: * Copyright 2003 (C) TJDO.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the TJDO License version 1.0.
06: * See the terms of the TJDO License in the documentation provided with this software.
07: *
08: * $Id: PointBaseAdapter.java,v 1.2 2004/01/31 19:47:27 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: import java.sql.DatabaseMetaData;
14:
15: /**
16: * Provides methods for adapting SQL language elements to the PointBase
17: * database.
18: * <p>
19: * Currently this adapter is just an untested placeholder.
20: *
21: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
22: */
23:
24: public class PointBaseAdapter extends DatabaseAdapter {
25: public PointBaseAdapter(DatabaseMetaData metadata) {
26: super (metadata);
27: }
28:
29: public String getVendorID() {
30: return "pointbase";
31: }
32:
33: public boolean supportsBooleanComparison() {
34: return false;
35: }
36:
37: public TableExpression newTableExpression(QueryStatement qs,
38: Table table, SQLIdentifier rangeVar) {
39: return new TableExprAsJoins(qs, table, rangeVar);
40: }
41:
42: public int getUnlimitedLengthPrecisionValue(TypeInfo typeInfo) {
43: if (typeInfo.dataType == java.sql.Types.BLOB
44: || typeInfo.dataType == java.sql.Types.CLOB)
45: return 1 << 31;
46: else
47: return super.getUnlimitedLengthPrecisionValue(typeInfo);
48: }
49: }
|