--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.reference.Limits\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to you under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.reference;\r
+\r
+public interface Limits\r
+{\r
+ /**\r
+ * Various fixed Limits. DB2 related limits are prefixed with "DB2_".\r
+ */\r
+\r
+ public static final int DB2_MAX_TRIGGER_RECURSION = 16; /* Maximum nesting level for triggers */\r
+\r
+ /** Maximum number of indexes on a table */\r
+ public static final int DB2_MAX_INDEXES_ON_TABLE = 32767;\r
+ /* Maximum number of columns in a table */\r
+ public static final int DB2_MAX_COLUMNS_IN_TABLE = 1012;\r
+\r
+ /* Maximum number of columns in a view */\r
+ public static final int DB2_MAX_COLUMNS_IN_VIEW = 5000;\r
+\r
+ /* Maximum number of parameters in a stored procedure */\r
+ public static final int DB2_MAX_PARAMS_IN_STORED_PROCEDURE = 90;\r
+\r
+ /* Maximum number of elements in a select list */\r
+ public static final int DB2_MAX_ELEMENTS_IN_SELECT_LIST = 1012;\r
+ /* Maximum number of columns in a group by list */\r
+ public static final int DB2_MAX_ELEMENTS_IN_GROUP_BY = 32677;\r
+ /* Maximum number of columns in an order by list */\r
+ public static final int DB2_MAX_ELEMENTS_IN_ORDER_BY = 1012;\r
+\r
+ // Max length for an exception parameter string over CCC server.\r
+ public static final int DB2_CCC_MAX_EXCEPTION_PARAM_LENGTH = 70;\r
+\r
+ // Warning. Changing this value will affect upgrade and the creation of the\r
+ // SQLCAMESSAGE procedure. See org.apache.derby.impl.sql.catalog.\r
+ public static final int DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH = 2400;\r
+\r
+ /* Identifiers (Constraint, Cursor, Function/Procedure, Index,\r
+ * Trigger, Column, Schema, Savepoint, Table and View names)\r
+ * are limited to 128 */ \r
+ public static final int MAX_IDENTIFIER_LENGTH = 128;\r
+\r
+ public static final int DB2_CHAR_MAXWIDTH = 254;\r
+ public static final int DB2_VARCHAR_MAXWIDTH = 32672;\r
+ public static final int DB2_LOB_MAXWIDTH = 2147483647;\r
+ public static final int DB2_LONGVARCHAR_MAXWIDTH = 32700;\r
+ public static final int DB2_CONCAT_VARCHAR_LENGTH = 4000;\r
+ public static final int DB2_MAX_FLOATINGPOINT_LITERAL_LENGTH = 30; // note, this value 30 is also contained in err msg 42820\r
+ public static final int DB2_MAX_CHARACTER_LITERAL_LENGTH = 32672;\r
+ public static final int DB2_MAX_HEX_LITERAL_LENGTH = 16336;\r
+\r
+ public static final int DB2_MIN_COL_LENGTH_FOR_CURRENT_USER = 8;\r
+ public static final int DB2_MIN_COL_LENGTH_FOR_CURRENT_SCHEMA = 128; \r
+ public static final int DB2_MAX_USERID_LENGTH = 30;\r
+\r
+ /**\r
+ * DB2 TABLESPACE page size limits\r
+ */\r
+ public static final int DB2_MIN_PAGE_SIZE = 4096; // 4k\r
+ public static final int DB2_MAX_PAGE_SIZE = 32768; // 32k\r
+\r
+ /**\r
+ * DECIMAL type limits\r
+ */\r
+\r
+ public static final int DB2_MAX_DECIMAL_PRECISION_SCALE = 31;\r
+ public static final int DB2_DEFAULT_DECIMAL_PRECISION = 5;\r
+ public static final int DB2_DEFAULT_DECIMAL_SCALE = 0;\r
+\r
+ /**\r
+ * REAL/DOUBLE range limits\r
+ */\r
+\r
+ static final float DB2_SMALLEST_REAL = -3.402E+38f;\r
+ static final float DB2_LARGEST_REAL = +3.402E+38f;\r
+ static final float DB2_SMALLEST_POSITIVE_REAL = +1.175E-37f;\r
+ static final float DB2_LARGEST_NEGATIVE_REAL = -1.175E-37f;\r
+\r
+ static final double DB2_SMALLEST_DOUBLE = -1.79769E+308d;\r
+ static final double DB2_LARGEST_DOUBLE = +1.79769E+308d;\r
+ static final double DB2_SMALLEST_POSITIVE_DOUBLE = +2.225E-307d;\r
+ static final double DB2_LARGEST_NEGATIVE_DOUBLE = -2.225E-307d;\r
+\r
+ \r
+}\r