KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > reference > Limits


1 /*
2
3    Derby - Class org.apache.derby.iapi.reference.Limits
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.iapi.reference;
23
24 public interface Limits
25 {
26     /**
27         * Various fixed Limits. DB2 related limits are prefixed with "DB2_".
28         */

29
30     public static final int DB2_MAX_TRIGGER_RECURSION = 16; /* Maximum nesting level for triggers */
31
32     /** Maximum number of indexes on a table */
33     public static final int DB2_MAX_INDEXES_ON_TABLE = 32767;
34     /* Maximum number of columns in a table */
35     public static final int DB2_MAX_COLUMNS_IN_TABLE = 1012;
36
37     /* Maximum number of columns in a view */
38     public static final int DB2_MAX_COLUMNS_IN_VIEW = 5000;
39
40     /* Maximum number of parameters in a stored procedure */
41     public static final int DB2_MAX_PARAMS_IN_STORED_PROCEDURE = 90;
42
43     /* Maximum number of elements in a select list */
44     public static final int DB2_MAX_ELEMENTS_IN_SELECT_LIST = 1012;
45     /* Maximum number of columns in a group by list */
46     public static final int DB2_MAX_ELEMENTS_IN_GROUP_BY = 32677;
47     /* Maximum number of columns in an order by list */
48     public static final int DB2_MAX_ELEMENTS_IN_ORDER_BY = 1012;
49
50     // Max length for an exception parameter string over CCC server.
51
public static final int DB2_CCC_MAX_EXCEPTION_PARAM_LENGTH = 70;
52
53     // Warning. Changing this value will affect upgrade and the creation of the
54
// SQLCAMESSAGE procedure. See org.apache.derby.impl.sql.catalog.
55
public static final int DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH = 2400;
56
57         /* Identifiers (Constraint, Cursor, Function/Procedure, Index,
58          * Trigger, Column, Schema, Savepoint, Table and View names)
59          * are limited to 128 */

60         public static final int MAX_IDENTIFIER_LENGTH = 128;
61
62     public static final int DB2_CHAR_MAXWIDTH = 254;
63     public static final int DB2_VARCHAR_MAXWIDTH = 32672;
64     public static final int DB2_LOB_MAXWIDTH = 2147483647;
65     public static final int DB2_LONGVARCHAR_MAXWIDTH = 32700;
66     public static final int DB2_CONCAT_VARCHAR_LENGTH = 4000;
67     public static final int DB2_MAX_FLOATINGPOINT_LITERAL_LENGTH = 30; // note, this value 30 is also contained in err msg 42820
68
public static final int DB2_MAX_CHARACTER_LITERAL_LENGTH = 32672;
69     public static final int DB2_MAX_HEX_LITERAL_LENGTH = 16336;
70
71     public static final int DB2_MIN_COL_LENGTH_FOR_CURRENT_USER = 8;
72     public static final int DB2_MIN_COL_LENGTH_FOR_CURRENT_SCHEMA = 128;
73     public static final int DB2_MAX_USERID_LENGTH = 30;
74
75     /**
76      * DB2 TABLESPACE page size limits
77      */

78     public static final int DB2_MIN_PAGE_SIZE = 4096; // 4k
79
public static final int DB2_MAX_PAGE_SIZE = 32768; // 32k
80

81     /**
82      * DECIMAL type limits
83      */

84
85     public static final int DB2_MAX_DECIMAL_PRECISION_SCALE = 31;
86     public static final int DB2_DEFAULT_DECIMAL_PRECISION = 5;
87     public static final int DB2_DEFAULT_DECIMAL_SCALE = 0;
88
89     /**
90      * REAL/DOUBLE range limits
91      */

92
93     static final float DB2_SMALLEST_REAL = -3.402E+38f;
94     static final float DB2_LARGEST_REAL = +3.402E+38f;
95     static final float DB2_SMALLEST_POSITIVE_REAL = +1.175E-37f;
96     static final float DB2_LARGEST_NEGATIVE_REAL = -1.175E-37f;
97
98     static final double DB2_SMALLEST_DOUBLE = -1.79769E+308d;
99     static final double DB2_LARGEST_DOUBLE = +1.79769E+308d;
100     static final double DB2_SMALLEST_POSITIVE_DOUBLE = +2.225E-307d;
101     static final double DB2_LARGEST_NEGATIVE_DOUBLE = -2.225E-307d;
102
103     
104 }
105
Popular Tags