01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.apache.lucene.store.jdbc.dialect;
18:
19: /**
20: * A Sybase dialect.
21: *
22: * @author kimchy
23: */
24: public class SybaseDialect extends Dialect {
25:
26: public boolean supportsForUpdate() {
27: return false;
28: }
29:
30: public String getForUpdateString() {
31: return "";
32: }
33:
34: public boolean supportsCurrentTimestampSelection() {
35: return true;
36: }
37:
38: public boolean isCurrentTimestampSelectStringCallable() {
39: return false;
40: }
41:
42: public String getCurrentTimestampSelectString() {
43: return "select getdate()";
44: }
45:
46: public String getVarcharType(int length) {
47: return "varchar(" + length + ")";
48: }
49:
50: public String getBlobType(long length) {
51: return "image";
52: }
53:
54: public String getNumberType() {
55: return "int";
56: }
57:
58: public String getTimestampType() {
59: return "datetime";
60: }
61:
62: public String getCurrentTimestampFunction() {
63: return "getdate()";
64: }
65:
66: public String getBitType() {
67: return "tinyint";
68: }
69: }
|