Rev 261 | Rev 374 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
247 | daniel-mar | 1 | <?php |
2 | |||
3 | /* |
||
4 | * OIDplus 2.0 |
||
5 | * Copyright 2020 Daniel Marschall, ViaThinkSoft |
||
6 | * |
||
7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
8 | * you may not use this file except in compliance with the License. |
||
9 | * You may obtain a copy of the License at |
||
10 | * |
||
11 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
12 | * |
||
13 | * Unless required by applicable law or agreed to in writing, software |
||
14 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
16 | * See the License for the specific language governing permissions and |
||
17 | * limitations under the License. |
||
18 | */ |
||
19 | |||
294 | daniel-mar | 20 | // Note: You can override these values in your userdata/baseconfig/config.inc.php file |
247 | daniel-mar | 21 | // Do NOT edit this file, because your changes would get overwritten |
22 | // by program updates! |
||
23 | |||
24 | // ----------------------------------------------------------------------------- |
||
25 | |||
26 | /** |
||
261 | daniel-mar | 27 | * LIMITS_MAX_OID_DEPTH |
247 | daniel-mar | 28 | * |
29 | * Example: |
||
30 | * OID 2.999.123.456 has a depth of 4. |
||
31 | * |
||
32 | * Default value: |
||
33 | * 30 |
||
34 | * |
||
35 | * Which value is realistic? |
||
36 | * In the oid-info.com database (April 2020), the greatest depth is 22. |
||
37 | * |
||
38 | * What would happen if you had OIDs with a higher arc size in your database? |
||
39 | * MySQL and MSSQL: The arcs after that maximum depth would not be sorted. |
||
40 | * PostgreSQL: No effects |
||
41 | * |
||
42 | * Note: This setting affects the performance of OIDplus, since it is used |
||
43 | * for sorting in MySQL and MSSQL (not in PostgreSQL). |
||
44 | **/ |
||
261 | daniel-mar | 45 | OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_DEPTH', 30); |
247 | daniel-mar | 46 | |
47 | // ----------------------------------------------------------------------------- |
||
48 | |||
49 | /** |
||
261 | daniel-mar | 50 | * LIMITS_MAX_ID_LENGTH |
247 | daniel-mar | 51 | * |
52 | * Example: |
||
53 | * OID 2.999.123.456 has a length of 13 characters in dot notation. |
||
54 | * OIDplus adds the prefix "oid:" in front of every OID, |
||
55 | * so the overal length of the ID would be 17. |
||
56 | * |
||
57 | * Default value: |
||
58 | * 255 digits (OIDs 251 digits) |
||
59 | * |
||
60 | * Which value is realistic? |
||
61 | * In the oid-info.com database (April 2020), the OID with the greatest size is 65 characters (dot notation) |
||
62 | * |
||
63 | * Maximal value: |
||
64 | * OIDs may only have a size of max 251 characters in dot notation. |
||
65 | * Reason: The field defintion of *_objects.oid is defined as varchar(255), |
||
66 | * and the OID will have the prefix 'oid:' (4 bytes). |
||
67 | * You can increase the limit by changing the field definition in the database. |
||
68 | **/ |
||
261 | daniel-mar | 69 | OIDplus::baseConfig()->setValue('LIMITS_MAX_ID_LENGTH', 255); |
247 | daniel-mar | 70 | |
71 | // ----------------------------------------------------------------------------- |
||
72 | |||
73 | /** |
||
261 | daniel-mar | 74 | * LIMITS_MAX_OID_ARC_SIZE |
247 | daniel-mar | 75 | * |
76 | * Example: |
||
77 | * OID 2.999.123.456 has a max arc size of 3 digits. |
||
78 | * |
||
79 | * Default value: |
||
80 | * 50 digits |
||
81 | * |
||
82 | * Minimal recommended value: |
||
83 | * The arc size should not be smaller than 39, because UUIDs (inside OID 2.25) |
||
84 | * have arcs up to 39 digits! |
||
85 | * In the oid-info.com database (April 2020), indeed, the greatest value 39. |
||
86 | * |
||
87 | * Maximal value: |
||
88 | * MySQL: |
||
89 | * Max value: 65 (limit by the DBMS) |
||
90 | * Reason: This is the limit of the "decimal" data type |
||
91 | * What would happen if you had OIDs with a higher arc size in your database? |
||
92 | * The sorting will not work, because MySQL handles the cast like this: |
||
93 | * cast('1234' as decimal(3)) = 999 |
||
94 | * PostgreSQL: |
||
95 | * Max value: 131072 (limit by the DBMS) |
||
96 | * Reason: This is the limit for the "numeric" data type. |
||
97 | * What would happen if you had OIDs with a higher arc size in your database? |
||
98 | * OIDplus will STOP WORKING, because the SQL queries will fail due to the failed cast. |
||
99 | * SQL Server: |
||
100 | * Max value: 512 (limit in function getOidArc) |
||
101 | * Reason: Since SQL Server does not support 128 bit integers (the limit of decimal is 38 digits), |
||
102 | * the function getOidArc() needs to pad each arc with zeros, |
||
103 | * returning a string that has to be sorted. |
||
104 | * The data type varchar(512) is the return value type of getOidArc(). |
||
105 | * If you need more (which is unlikely), you can edit the definition of that function. |
||
106 | * What would happen if you had OIDs with a higher arc size in your database? |
||
107 | * The sorting will not work, because SQL Server handles the cast like this: |
||
108 | * select cast('1234' as varchar(3)) = '123' |
||
109 | **/ |
||
261 | daniel-mar | 110 | OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_ARC_SIZE', 50); |
247 | daniel-mar | 111 | |
112 | // ----------------------------------------------------------------------------- |
||
113 | |||
114 | /** |
||
261 | daniel-mar | 115 | * LIMITS_MAX_OID_ASN1_ID_LEN |
247 | daniel-mar | 116 | * |
117 | * Default value: |
||
118 | * 255 characters |
||
119 | * |
||
120 | * Maximal value: |
||
121 | * 255, as defined in the database fields *_asn1id.name |
||
122 | * You can change the database field definition if you really need more. |
||
123 | **/ |
||
261 | daniel-mar | 124 | OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_ASN1_ID_LEN', 255); |
247 | daniel-mar | 125 | |
126 | // ----------------------------------------------------------------------------- |
||
127 | |||
128 | /** |
||
261 | daniel-mar | 129 | * LIMITS_MAX_OID_UNICODE_LABEL_LEN |
247 | daniel-mar | 130 | * |
131 | * Default value: |
||
132 | * 255 bytes (UTF-8 encoded!) |
||
133 | * |
||
134 | * Maximal value: |
||
135 | * 255, as defined in the database fields *_iri.name |
||
136 | * You can change the database field definition if you really need more. |
||
137 | **/ |
||
261 | daniel-mar | 138 | OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_UNICODE_LABEL_LEN', 255); |
247 | daniel-mar | 139 | |
140 | // ----------------------------------------------------------------------------- |