| 111 | } |
| 112 | |
| 113 | bool sqliteOperation::initialize() { |
| 114 | if (NULL == dbPtr) { |
| 115 | std::cerr << "Create connection first" << std::endl; |
| 116 | return false; |
| 117 | } |
| 118 | |
| 119 | // create spatial metadata |
| 120 | if (!sqlitePackage::initSpatialMeta(dbPtr)) return false; |
| 121 | |
| 122 | // create temp table |
| 123 | // attention mutil process situation |
| 124 | /* |
| 125 | if ( !sqlitePackage::isTableExists( dbPtr, TEMP_TABLE ) ) |
| 126 | { |
| 127 | if ( !sqlitePackage::execSql( dbPtr, SQL_CREATE_TEMP_TABLE ) ) |
| 128 | { |
| 129 | if ( !sqlitePackage::isTableExists( dbPtr, TEMP_TABLE ) ){ |
| 130 | return false;} |
| 131 | } |
| 132 | } |
| 133 | */ |
| 134 | |
| 135 | bool ret = initializeTables(); |
| 136 | return ret; |
| 137 | } |
| 138 | |
| 139 | bool sqliteOperation::initializeTables() { |
| 140 | // check division table |
no outgoing calls
no test coverage detected