| 1 | /* | 
|---|
| 2 | * Legal Notice | 
|---|
| 3 | * | 
|---|
| 4 | * This document and associated source code (the "Work") is a part of a | 
|---|
| 5 | * benchmark specification maintained by the TPC. | 
|---|
| 6 | * | 
|---|
| 7 | * The TPC reserves all right, title, and interest to the Work as provided | 
|---|
| 8 | * under U.S. and international laws, including without limitation all patent | 
|---|
| 9 | * and trademark rights therein. | 
|---|
| 10 | * | 
|---|
| 11 | * No Warranty | 
|---|
| 12 | * | 
|---|
| 13 | * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION | 
|---|
| 14 | *     CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE | 
|---|
| 15 | *     AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER | 
|---|
| 16 | *     WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, | 
|---|
| 17 | *     INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, | 
|---|
| 18 | *     DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR | 
|---|
| 19 | *     PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF | 
|---|
| 20 | *     WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE. | 
|---|
| 21 | *     ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, | 
|---|
| 22 | *     QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT | 
|---|
| 23 | *     WITH REGARD TO THE WORK. | 
|---|
| 24 | * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO | 
|---|
| 25 | *     ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE | 
|---|
| 26 | *     COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS | 
|---|
| 27 | *     OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, | 
|---|
| 28 | *     INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, | 
|---|
| 29 | *     OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT | 
|---|
| 30 | *     RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD | 
|---|
| 31 | *     ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. | 
|---|
| 32 | * | 
|---|
| 33 | * Contributors | 
|---|
| 34 | * - Sergey Vasilevskiy | 
|---|
| 35 | */ | 
|---|
| 36 |  | 
|---|
| 37 | /* | 
|---|
| 38 | *   Table column length constants used by the loader and | 
|---|
| 39 | *   transactions. | 
|---|
| 40 | */ | 
|---|
| 41 | #ifndef TABLE_CONSTS_H | 
|---|
| 42 | #define TABLE_CONSTS_H | 
|---|
| 43 |  | 
|---|
| 44 | #include "EGenStandardTypes.h" | 
|---|
| 45 |  | 
|---|
| 46 | namespace TPCE { | 
|---|
| 47 |  | 
|---|
| 48 | // ADDRESS / ZIP_CODE tables | 
|---|
| 49 | const int cTOWN_len = 80; | 
|---|
| 50 | const int cDIV_len = 80; | 
|---|
| 51 | const int cCODE_len = 12; | 
|---|
| 52 |  | 
|---|
| 53 | // ACCOUNT_PERMISSION table | 
|---|
| 54 | const int cACL_len = 4; | 
|---|
| 55 |  | 
|---|
| 56 | // ADDRESS table | 
|---|
| 57 | const int cAD_NAME_len = 80; | 
|---|
| 58 | const int cAD_LINE_len = 80; | 
|---|
| 59 | const int cAD_TOWN_len = cTOWN_len; | 
|---|
| 60 | const int cAD_DIV_len = cDIV_len; // state/provice abreviation | 
|---|
| 61 | const int cAD_ZIP_len = cCODE_len; | 
|---|
| 62 | const int cAD_CTRY_len = 80; | 
|---|
| 63 |  | 
|---|
| 64 | // CASH_TRANSACTION table | 
|---|
| 65 | const int cCT_NAME_len = 100; | 
|---|
| 66 |  | 
|---|
| 67 | // CUSTOMER table | 
|---|
| 68 | const int cL_NAME_len = 25; | 
|---|
| 69 | const int cF_NAME_len = 20; | 
|---|
| 70 | const int cM_NAME_len = 1; | 
|---|
| 71 | const int cDOB_len = 30; | 
|---|
| 72 | const int cTAX_ID_len = 20; | 
|---|
| 73 | const int cGNDR_len = 1; | 
|---|
| 74 | const int cCTRY_len = 3; | 
|---|
| 75 | const int cAREA_len = 3; | 
|---|
| 76 | const int cLOCAL_len = 10; | 
|---|
| 77 | const int cEXT_len = 5; | 
|---|
| 78 | const int cEMAIL_len = 50; | 
|---|
| 79 |  | 
|---|
| 80 | // BROKER table | 
|---|
| 81 | const int cB_NAME_len = cF_NAME_len + cM_NAME_len + cL_NAME_len + 3; // two spaces and one period | 
|---|
| 82 |  | 
|---|
| 83 | // COMPANY table | 
|---|
| 84 | const int cCO_NAME_len = 60; | 
|---|
| 85 | const int cSP_RATE_len = 4; | 
|---|
| 86 | const int cCEO_NAME_len = cF_NAME_len + cL_NAME_len + 1; // one space | 
|---|
| 87 | const int cCO_DESC_len = 150; | 
|---|
| 88 | const int cCO_SP_RATE_len = 4; | 
|---|
| 89 |  | 
|---|
| 90 | // CUSTOMER_ACCOUNT table | 
|---|
| 91 | const int cCA_NAME_len = 50; | 
|---|
| 92 |  | 
|---|
| 93 | // EXCHANGE table | 
|---|
| 94 | const int cEX_ID_len = 6; | 
|---|
| 95 | const int cEX_NAME_len = 100; | 
|---|
| 96 | const int cEX_DESC_len = 150; | 
|---|
| 97 | // const int cEX_OPEN_len = 8; | 
|---|
| 98 | // const int cEX_CLOSE_len = 8; | 
|---|
| 99 |  | 
|---|
| 100 | // HOLDING table | 
|---|
| 101 | const int cH_BUY_DTS_len = 30; // date of purchase | 
|---|
| 102 |  | 
|---|
| 103 | // INDUSTRY table | 
|---|
| 104 | const int cIN_ID_len = 2; | 
|---|
| 105 | const int cIN_NAME_len = 50; | 
|---|
| 106 |  | 
|---|
| 107 | // NEWS_ITEM table | 
|---|
| 108 | const int cNI_HEADLINE_len = 80; | 
|---|
| 109 | const int cNI_SUMMARY_len = 255; | 
|---|
| 110 | const int cNI_ITEM_len = 100 * 1000; | 
|---|
| 111 | const int cNI_SOURCE_len = 30; | 
|---|
| 112 | const int cNI_AUTHOR_len = 30; | 
|---|
| 113 |  | 
|---|
| 114 | // SECURITY table | 
|---|
| 115 | const int cS_NAME_len = 70; | 
|---|
| 116 | const int cSYMBOL_len = 7 + 1 + 7; // base + separator + extended | 
|---|
| 117 | const int cS_ISSUE_len = 6; | 
|---|
| 118 |  | 
|---|
| 119 | // SETTLEMENT table | 
|---|
| 120 | const int cSE_CASH_TYPE_len = 40; | 
|---|
| 121 |  | 
|---|
| 122 | // SECTOR table | 
|---|
| 123 | const int cSC_NAME_len = 30; | 
|---|
| 124 | const int cSC_ID_len = 2; | 
|---|
| 125 |  | 
|---|
| 126 | // STATUS_TYPE table | 
|---|
| 127 | const int cST_ID_len = 4; | 
|---|
| 128 | const int cST_NAME_len = 10; | 
|---|
| 129 |  | 
|---|
| 130 | // TAX RATE table | 
|---|
| 131 | const int cTX_ID_len = 4; | 
|---|
| 132 | const int cTX_NAME_len = 50; | 
|---|
| 133 |  | 
|---|
| 134 | // TRADE table | 
|---|
| 135 | const int cEXEC_NAME_len = cF_NAME_len + cM_NAME_len + cL_NAME_len + 3; // two spaces and one extra | 
|---|
| 136 |  | 
|---|
| 137 | // TRADE_HISTORY table | 
|---|
| 138 | const int cTH_ST_ID_len = cST_ID_len; | 
|---|
| 139 |  | 
|---|
| 140 | // TRADE TYPE table | 
|---|
| 141 | const int cTT_ID_len = 3; | 
|---|
| 142 | const int cTT_NAME_len = 12; | 
|---|
| 143 |  | 
|---|
| 144 | // ZIP_CODE table | 
|---|
| 145 | const int cZC_TOWN_len = cTOWN_len; | 
|---|
| 146 | const int cZC_DIV_len = cDIV_len; | 
|---|
| 147 | const int cZC_CODE_len = cCODE_len; | 
|---|
| 148 |  | 
|---|
| 149 | } // namespace TPCE | 
|---|
| 150 |  | 
|---|
| 151 | #endif // TABLE_CONSTS_H | 
|---|
| 152 |  | 
|---|