001: /*
002: * CreateTableSQLSyntax.java
003: *
004: * Copyright (C) 2002, 2003, 2004, 2005, 2006 Takis Diakoumis
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: *
020: */
021:
022: package org.executequery.gui.table;
023:
024: import org.executequery.gui.browser.ColumnConstraint;
025:
026: /* ----------------------------------------------------------
027: * CVS NOTE: Changes to the CVS repository prior to the
028: * release of version 3.0.0beta1 has meant a
029: * resetting of CVS revision numbers.
030: * ----------------------------------------------------------
031: */
032:
033: /**
034: *
035: * @author Takis Diakoumis
036: * @version $Revision: 1.4 $
037: * @date $Date: 2006/05/14 06:56:52 $
038: */
039: public interface CreateTableSQLSyntax {
040:
041: int CREATE_TABLE_MODE = 0;
042: int EDIT_TABLE_MODE = 1;
043:
044: //------------------------------------------------
045: // The following are reuseable String constants
046: // used in the SQL text pane when making table
047: // or other schema modifications.
048: //------------------------------------------------
049:
050: String[] KEY_NAMES = { ColumnConstraint.PRIMARY,
051: ColumnConstraint.FOREIGN, ColumnConstraint.UNIQUE };
052:
053: /** The literal 'CREATE TABLE ' */
054: String CREATE_TABLE = "CREATE TABLE ";
055: /** The literal ' NOT NULL' */
056: String NOT_NULL = " NOT NULL";
057: /** The literal 'DATE' */
058: String DATE = "DATE";
059: /** The literal 'pk_' */
060: String PK_PREFIX = "pk_";
061: /** The literal 'NUMBER' */
062: String NUMBER = "NUMBER";
063: /** The literal 'CONSTRAINT' */
064: String CONSTRAINT = "CONSTRAINT ";
065: /** The String literal ' RENAME CONSTRAINT ' */
066: String RENAME_CONSTRAINT = " RENAME CONSTRAINT ";
067: /** The String literal ' ADD CONSTRAINT ' */
068: String ADD_CONSTRAINT = " ADD CONSTRAINT ";
069: /** The String literal ' TO ' */
070: String TO = " TO ";
071: /** New line with 7 space indent */
072: String INDENT = "\n ";
073: /** The literal 'REFERENCES ' */
074: String REFERENCES = " REFERENCES ";
075: /** The literal ' PRIMARY' */
076: String PRIMARY = " PRIMARY";
077: /** The literal ' KEY ' */
078: String KEY = " KEY ";
079: /** The literal '\n' */
080: char NEW_LINE = '\n';
081: String NEW_LINE_2 = "\n ";
082: /** The literal ' ' */
083: /** The String literal 'ALTER TABLE ' */
084: String ALTER_TABLE = "ALTER TABLE ";
085: /** The String literal ' ADD ' */
086: String ADD = " ADD ";
087: String SPACE = " ";
088: /** An empty <code>String</code> */
089: String EMPTY = "";
090: /** The literal '(' */
091: String B_OPEN = "(";
092: /** The literal ',' */
093: char COMMA = ',';
094: /** The literal ')' */
095: char B_CLOSE = ')';
096: /** The literal '.' */
097: char DOT = '.';
098: /** The literal ';' */
099: char SEMI_COLON = ';';
100: /** The literal ' DROP CONSTRAINT ' */
101: String DROP_CONSTRAINT = " DROP CONSTRAINT ";
102:
103: }
|