| Total Complexity | 1 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | |||
| 2 | CNBP_schema_table_name = 'id_table' |
||
| 3 | |||
| 4 | CNBP_schema_keyfield = 'MRN' |
||
| 5 | CNBP_schema_keyfield_type = 'INTEGER' |
||
| 6 | |||
| 7 | CNBP_schema_fields = ['CNBPID', 'CNNID', 'CNFUNID', 'PSCID', 'DCCID', 'Timepoint', 'Hash1', 'Hash2', 'Hash3'] |
||
| 8 | CNBP_schema_fields_types = ['TEXT', 'INTEGER', 'INTEGER', 'TEXT', 'INTEGER', 'INTEGER', 'TEXT', 'TEXT', 'TEXT'] |
||
| 9 | |||
| 10 | def concatenatedSchema(): |
||
| 11 | """ |
||
| 12 | Schemea does not include keyfield as that is specified during table creation. This provides a way to return the ENTIRE table schema including both. |
||
| 13 | :return: |
||
| 14 | """ |
||
| 15 | import copy |
||
| 16 | |||
| 17 | CNBP_schema = copy.deepcopy(CNBP_schema_fields) |
||
| 18 | CNBP_schema.insert(0, CNBP_schema_keyfield) |
||
| 19 | |||
| 20 | CNBP_schema_types = copy.deepcopy(CNBP_schema_fields_types) |
||
| 21 | CNBP_schema_types.insert(0, CNBP_schema_keyfield_type) |
||
| 22 | |||
| 23 | return CNBP_schema, CNBP_schema_types |
||
| 24 | |||
| 25 | |||
| 26 | CNBP_schema, CNBP_schema_types = concatenatedSchema() |
||
| 27 | |||
| 28 | |||
| 29 | if __name__ == '__main__': |
||
| 30 | print(concatenatedSchema()) |
||
| 31 | |||
| 32 |