Subversion Repositories oidplus

Rev

Rev 511 | Rev 1167 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. /*
  4.  * OIDplus 2.0
  5.  * Copyright 2019 - 2021 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.  
  20. use ViaThinkSoft\OIDplus\OIDplus;
  21.  
  22. // Note: You can override these values in your userdata/baseconfig/config.inc.php file
  23. //       Do NOT edit this file, because your changes would get overwritten
  24. //       by program updates!
  25.  
  26. // -----------------------------------------------------------------------------
  27.  
  28. /**
  29.   * LIMITS_MAX_OID_DEPTH
  30.   *
  31.   * Example:
  32.   *     OID 2.999.123.456 has a depth of 4.
  33.   *
  34.   * Default value:
  35.   *     30
  36.   *
  37.   * Which value is realistic?
  38.   *     In the oid-info.com database (April 2020), the greatest depth is 22.
  39.   *
  40.   * What would happen if you had OIDs with a higher arc size in your database?
  41.   *     MySQL and MSSQL: The arcs after that maximum depth would not be sorted.
  42.   *     PostgreSQL: No effects
  43.   *
  44.   * Note: This setting affects the performance of OIDplus, since it is used
  45.   *       for sorting in MySQL and MSSQL (not in PostgreSQL).
  46.   **/
  47. OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_DEPTH', 30);
  48.  
  49. // -----------------------------------------------------------------------------
  50.  
  51. /**
  52.   * LIMITS_MAX_ID_LENGTH
  53.   *
  54.   * Example:
  55.   *     OID 2.999.123.456 has a length of 13 characters in dot notation.
  56.   *     OIDplus adds the prefix "oid:" in front of every OID,
  57.   *     so the overal length of the ID would be 17.
  58.   *
  59.   * Default value:
  60.   *     255 digits (OIDs 251 digits)
  61.   *
  62.   * Which value is realistic?
  63.   *     In the oid-info.com database (April 2020), the OID with the greatest size is 65 characters (dot notation)
  64.   *
  65.   * Maximal value:
  66.   *     OIDs may only have a size of max 251 characters in dot notation.
  67.   *     Reason: The field defintion of *_objects.oid is defined as varchar(255),
  68.   *             and the OID will have the prefix 'oid:' (4 bytes).
  69.   *     You can increase the limit by changing the field definition in the database.
  70.   **/
  71. OIDplus::baseConfig()->setValue('LIMITS_MAX_ID_LENGTH', 255);
  72.  
  73. // -----------------------------------------------------------------------------
  74.  
  75. /**
  76.   * LIMITS_MAX_OID_ARC_SIZE
  77.   *
  78.   * Example:
  79.   *     OID 2.999.123.456 has a max arc size of 3 digits.
  80.   *
  81.   * Default value:
  82.   *     50 digits
  83.   *
  84.   * Minimal recommended value:
  85.   *     The arc size should not be smaller than 39, because UUIDs (inside OID 2.25)
  86.   *     have arcs up to 39 digits!
  87.   *     In the oid-info.com database (April 2020), indeed, the greatest value 39.
  88.   *
  89.   * Maximal value:
  90.   *     MySQL:
  91.   *             Max value: 65 (limit by the DBMS)
  92.   *             Reason: This is the limit of the "decimal" data type
  93.   *             What would happen if you had OIDs with a higher arc size in your database?
  94.   *                     The sorting will not work, because MySQL handles the cast like this:
  95.   *                     cast('1234' as decimal(3)) = 999
  96.   *     PostgreSQL:
  97.   *             Max value: 131072 (limit by the DBMS)
  98.   *             Reason: This is the limit for the "numeric" data type.
  99.   *             What would happen if you had OIDs with a higher arc size in your database?
  100.   *                     OIDplus will STOP WORKING, because the SQL queries will fail due to the failed cast.
  101.   *     SQL Server:
  102.   *             Max value: 512 (limit in function getOidArc)
  103.   *             Reason: Since SQL Server does not support 128 bit integers (the limit of decimal is 38 digits),
  104.   *                     the function getOidArc() needs to pad each arc with zeros,
  105.   *                     returning a string that has to be sorted.
  106.   *                     The data type varchar(512) is the return value type of getOidArc().
  107.   *                     If you need more (which is unlikely), you can edit the definition of that function.
  108.   *             What would happen if you had OIDs with a higher arc size in your database?
  109.   *                     The sorting will not work, because SQL Server handles the cast like this:
  110.   *                     select cast('1234' as varchar(3)) = '123'
  111.   **/
  112. OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_ARC_SIZE', 50);
  113.  
  114. // -----------------------------------------------------------------------------
  115.  
  116. /**
  117.   * LIMITS_MAX_OID_ASN1_ID_LEN
  118.   *
  119.   * Default value:
  120.   *     255 characters
  121.   *
  122.   * Maximal value:
  123.   *     255, as defined in the database fields *_asn1id.name
  124.   *     You can change the database field definition if you really need more.
  125.   **/
  126. OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_ASN1_ID_LEN', 255);
  127.  
  128. // -----------------------------------------------------------------------------
  129.  
  130. /**
  131.   * LIMITS_MAX_OID_UNICODE_LABEL_LEN
  132.   *
  133.   * Default value:
  134.   *     255 bytes (UTF-8 encoded!)
  135.   *
  136.   * Maximal value:
  137.   *     255, as defined in the database fields *_iri.name
  138.   *     You can change the database field definition if you really need more.
  139.   **/
  140. OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_UNICODE_LABEL_LEN', 255);
  141.  
  142. // -----------------------------------------------------------------------------
  143.