01: /*
02: * ASAConstraintReader.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.db;
13:
14: /**
15: * Constraint reader for Adaptive Server Anywhere
16: * @author support@sql-workbench.net
17: */
18: public class ASAConstraintReader extends AbstractConstraintReader {
19:
20: private static final String TABLE_SQL = "select chk.check_defn \n"
21: + "from syscheck chk, sysconstraint cons, systable tbl \n"
22: + "where chk.check_id = cons.constraint_id \n"
23: + "and cons.constraint_type = 'T' \n"
24: + "and cons.table_id = tbl.table_id \n"
25: + "and tbl.table_name = ? \n";
26:
27: /** Creates a new instance of FirebirdColumnConstraintReader */
28: public ASAConstraintReader() {
29: }
30:
31: public String getColumnConstraintSql() {
32: return null;
33: }
34:
35: public String getTableConstraintSql() {
36: return TABLE_SQL;
37: }
38:
39: public int getIndexForTableNameParameter() {
40: return 1;
41: }
42: }
|