001: /*
002: * Copyright 2002 (C) TJDO.
003: * All rights reserved.
004: *
005: * This software is distributed under the terms of the TJDO License version 1.0.
006: * See the terms of the TJDO License in the documentation provided with this software.
007: *
008: * $Id: SQL92Constants.java,v 1.1 2002/12/07 05:32:25 jackknifebarber Exp $
009: */
010:
011: package com.triactive.jdo.store;
012:
013: /**
014: * Contains various constants from the SQL/92 standard.
015: *
016: * <h4>SQL/92 Key Words</h4>
017: * A <dfn>key word</dfn> is a word that has one or more meanings in the SQL
018: * language itself.
019: * Some key words are <dfn>reserved words</dfn>, meaning they cannot be used as
020: * a regular identifier.
021: * The remaining key words are <dfn>non-reserved</dfn>.
022: *
023: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
024: * @version $Revision: 1.1 $
025: *
026: * @see DatabaseAdapter
027: */
028:
029: public interface SQL92Constants {
030: /**
031: * The maximum length of a SQL/92 identifier in characters.
032: */
033: public static final int MAX_IDENTIFIER_LENGTH = 128;
034:
035: /**
036: * A string containing the list of SQL/92 <dfn>reserved words</dfn>,
037: * separated by commas.
038: */
039:
040: public static final String RESERVED_WORDS = "ABSOLUTE,ACTION,ADD,ALL,ALLOCATE,ALTER,AND,"
041: + "ANY,ARE,AS,ASC,"
042: + "ASSERTION,AT,AUTHORIZATION,AVG,"
043: + "BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,"
044: + "CASCADE,CASCADED,CASE,CAST,CATALOG,CHAR,CHARACTER,CHAR_LENGTH,"
045: + "CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,COLLATE,COLLATION,"
046: + "COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"
047: + "CONSTRAINTS,CONTINUE,"
048: + "CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"
049: + "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"
050: + "DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"
051: + "DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,"
052: + "DISCONNECT,DISTINCT,DOMAIN,DOUBLE,DROP,"
053: + "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,"
054: + "EXEC,EXECUTE,EXISTS,"
055: + "EXTERNAL,EXTRACT,"
056: + "FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FOUND,FROM,FULL,"
057: + "GET,GLOBAL,GO,GOTO,GRANT,GROUP,"
058: + "HAVING,HOUR,"
059: + "IDENTITY,IMMEDIATE,IN,INDICATOR,INITIALLY,INNER,INPUT,"
060: + "INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,"
061: + "ISOLATION,"
062: + "JOIN,"
063: + "KEY,"
064: + "LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"
065: + "MATCH,MAX,MIN,MINUTE,MODULE,MONTH,"
066: + "NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NOT,NULL,"
067: + "NULLIF,NUMERIC,"
068: + "OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,"
069: + "ORDER,OUTER,"
070: + "OUTPUT,OVERLAPS,"
071: + "PAD,PARTIAL,POSITION,PRECISION,PREPARE,PRESERVE,PRIMARY,"
072: + "PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"
073: + "READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,"
074: + "ROLLBACK,ROWS,"
075: + "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,"
076: + "SIZE,SMALLINT,SOME,SPACE,SQL,SQLCODE,SQLERROR,SQLSTATE,"
077: + "SUBSTRING,SUM,SYSTEM_USER,"
078: + "TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"
079: + "TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"
080: + "UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"
081: + "VALUE,VALUES,VARCHAR,VARYING,VIEW,"
082: + "WHEN,WHENEVER,WHERE,WITH,WORK,WRITE," + "YEAR," + "ZONE";
083:
084: /**
085: * A string containing the list of SQL/92 <dfn>non-reserved words</dfn>,
086: * separated by commas.
087: */
088:
089: public static final String NONRESERVED_WORDS = "ADA,"
090: + "C,CATALOG_NAME,CHARACTER_SET_CATALOG,CHARACTER_SET_NAME,"
091: + "CHARACTER_SET_SCHEMA,CLASS_ORIGIN,COBOL,COLLATION_CATALOG,"
092: + "COLLATION_NAME,COLLATION_SCHEMA,COLUMN_NAME,COMMAND_FUNCTION,COMMITTED,"
093: + "CONDITION_NUMBER,CONNECTION_NAME,CONSTRAINT_CATALOG,CONSTRAINT_NAME,"
094: + "CONSTRAINT_SCHEMA,CURSOR_NAME,"
095: + "DATA,DATETIME_INTERVAL_CODE,DATETIME_INTERVAL_PRECISION,DYNAMIC_FUNCTION,"
096: + "FORTRAN,"
097: + "LENGTH,"
098: + "MESSAGE_LENGTH,MESSAGE_OCTET_LENGTH,MESSAGE_TEXT,MORE,MUMPS,"
099: + "NAME,NULLABLE,NUMBER,"
100: + "PASCAL,PLI,"
101: + "REPEATABLE,RETURNED_LENGTH,RETURNED_OCTET_LENGTH,RETURNED_SQLSTATE,"
102: + "ROW_COUNT,"
103: + "SCALE,SCHEMA_NAME,SERIALIZABLE,SERVER_NAME,SUBCLASS_ORIGIN,"
104: + "TABLE_NAME,TYPE," + "UNCOMMITTED,UNNAMED";
105: }
|