/test/xts/acts/distributeddatamgr/relationalStoretest/rdbnapitest/entry/src/main/cpp/napi/ |
H A D | rdb_store_backup_test.cpp | 122 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql);
in SUB_DDM_RDB_BackupRestoreTest_0100() local 125 cursor->getRowCount(cursor, &rowCount);
in SUB_DDM_RDB_BackupRestoreTest_0100() 127 cursor->destroy(cursor);
in SUB_DDM_RDB_BackupRestoreTest_0100() 156 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql);
in SUB_DDM_RDB_BackupRestoreTest_0300() local 159 cursor->getRowCount(cursor, &rowCount);
in SUB_DDM_RDB_BackupRestoreTest_0300() 161 cursor->destroy(cursor);
in SUB_DDM_RDB_BackupRestoreTest_0300() 234 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql); SUB_DDM_RDB_BackupRestoreTest_0400() local 294 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql); SUB_DDM_RDB_BackupRestoreTest_0500() local 371 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql); SUB_DDM_RDB_BackupRestoreTest_0600() local 446 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql); SUB_DDM_RDB_BackupRestoreTest_0700() local 477 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql); SUB_DDM_RDB_BackupRestoreTest_0800() local 561 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql); SUB_DDM_RDB_BackupRestoreTest_0900() local 619 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeBackupTestRdbStore_, querySql); SUB_DDM_RDB_BackupRestoreTest_0110() local [all...] |
H A D | rdb_store_predicates_test.cpp | 167 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0);
in SUB_DDM_RDB_Predicates_0100() local 168 NAPI_ASSERT(env, cursor != NULL, "OH_Rdb_Query is fail.");
in SUB_DDM_RDB_Predicates_0100() 171 errCode = cursor->getRowCount(cursor, &rowCount);
in SUB_DDM_RDB_Predicates_0100() 176 errCode = cursor->destroy(cursor);
in SUB_DDM_RDB_Predicates_0100() 195 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0);
in SUB_DDM_RDB_Predicates_0200() local 196 NAPI_ASSERT(env, cursor != NULL, "OH_Rdb_Query is fail.");
in SUB_DDM_RDB_Predicates_0200() 198 errCode = cursor->getRowCount(cursor, in SUB_DDM_RDB_Predicates_0200() 224 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_0300() local 251 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_0400() local 281 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_0500() local 308 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_0600() local 332 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_0700() local 355 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_0800() local 387 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_0900() local 416 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1000() local 445 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1100() local 483 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1200() local 512 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1300() local 543 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1400() local 570 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1500() local 600 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1600() local 627 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1700() local 660 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1800() local 682 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_1900() local 712 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2000() local 744 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2100() local 774 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2200() local 804 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2300() local 838 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2400() local 868 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2500() local 898 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2600() local 929 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2700() local 958 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2800() local 987 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_2900() local 1022 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3000() local 1055 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3100() local 1087 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3200() local 1112 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3300() local 1135 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3400() local 1161 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3500() local 1188 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3600() local 1215 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3700() local 1243 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3800() local 1271 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_3900() local 1299 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4000() local 1328 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4100() local 1357 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4200() local 1386 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4300() local 1414 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4400() local 1442 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4500() local 1471 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4600() local 1500 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4700() local 1528 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4800() local 1557 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_4900() local 1585 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5000() local 1613 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5100() local 1642 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5200() local 1670 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5300() local 1696 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5400() local 1720 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5500() local 1744 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5600() local 1769 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5800() local 1796 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_5900() local 1824 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6000() local 1853 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6100() local 1882 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6200() local 1909 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6300() local 1944 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6400() local 1970 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6500() local 1997 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6600() local 2024 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_Predicates_6700() local [all...] |
H A D | rdb_store_cursor_test.cpp | 190 * @tc.desc: napi test RDB cursor for GetColumnType.
198 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0);
in SUB_DDM_RDB_CURSOR_0100() local 199 NAPI_ASSERT(env, cursor != NULL, "OH_Rdb_Query config is fail.");
in SUB_DDM_RDB_CURSOR_0100() 201 cursor->goToNextRow(cursor);
in SUB_DDM_RDB_CURSOR_0100() 204 errCode = cursor->getColumnType(cursor, 0, &type);
in SUB_DDM_RDB_CURSOR_0100() 207 errCode = cursor->getColumnType(cursor, 1, &type);;
in SUB_DDM_RDB_CURSOR_0100() 210 errCode = cursor in SUB_DDM_RDB_CURSOR_0100() 240 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_0200() local 274 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_0300() local 312 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, columnNames, len1); SUB_DDM_RDB_CURSOR_0400() local 378 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_0500() local 400 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_0600() local 423 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_0700() local 448 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_0800() local 472 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, columnNames, len1); SUB_DDM_RDB_CURSOR_0900() local 508 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, columnNames, len1); SUB_DDM_RDB_CURSOR_1000() local 545 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, columnNames, len1); SUB_DDM_RDB_CURSOR_1100() local 580 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, columnNames, len); SUB_DDM_RDB_CURSOR_1200() local 615 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, columnNames, len1); SUB_DDM_RDB_CURSOR_1300() local 652 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, columnNames, len1); SUB_DDM_RDB_CURSOR_1400() local 690 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_1500() local 717 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_1600() local 749 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_1700() local 776 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_1800() local 909 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_2200() local 967 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_2300() local 1031 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_2400() local 1066 OH_Cursor *cursor = OH_Rdb_Query(cursorTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_CURSOR_2500() local [all...] |
H A D | rdb_store_test.cpp | 175 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0);
in SUB_DDM_RDB_0100() local 176 NAPI_ASSERT(env, cursor != NULL, "OH_Rdb_Query is fail.");
in SUB_DDM_RDB_0100() 179 cursor->getRowCount(cursor, &rowCount);
in SUB_DDM_RDB_0100() 182 errCode = cursor->goToNextRow(cursor);
in SUB_DDM_RDB_0100() 186 cursor->getSize(cursor, 1, &size);
in SUB_DDM_RDB_0100() 188 cursor->getText(cursor, in SUB_DDM_RDB_0100() 261 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeTestRdbStore_, querySql); SUB_DDM_RDB_0200() local 316 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates2, NULL, 0); SUB_DDM_RDB_0300() local 392 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_0400() local 452 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_0500() local 503 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_0600() local 548 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 1); SUB_DDM_RDB_0700() local 590 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 1); SUB_DDM_RDB_0800() local 644 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeTestRdbStore_, querySql); SUB_DDM_RDB_0900() local 706 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeTestRdbStore_, querySql); SUB_DDM_RDB_1000() local 754 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates1, NULL, 0); SUB_DDM_RDB_1100() local 821 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_1200() local 875 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_1300() local 922 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeTestRdbStore_, querySql); SUB_DDM_RDB_1400() local 970 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeTestRdbStore_, querySql); SUB_DDM_RDB_1500() local 1021 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeTestRdbStore_, querySql); SUB_DDM_RDB_1600() local 1072 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeTestRdbStore_, querySql); SUB_DDM_RDB_1700() local 1138 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 1); SUB_DDM_RDB_1900() local 1190 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_2000() local 1254 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 0); SUB_DDM_RDB_2100() local 1295 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 2); SUB_DDM_RDB_2200() local 1338 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 7); SUB_DDM_RDB_2300() local 1381 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, NULL, 1); SUB_DDM_RDB_2400() local 1426 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 0); SUB_DDM_RDB_2500() local 1470 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 1); SUB_DDM_RDB_2600() local 1514 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 2); SUB_DDM_RDB_2700() local 1556 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 4); SUB_DDM_RDB_2800() local 1597 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 3); SUB_DDM_RDB_2900() local 1638 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 5); SUB_DDM_RDB_3000() local 1676 OH_Cursor *cursor = OH_Rdb_Query(storeTestRdbStore_, predicates, columnNames, 5); SUB_DDM_RDB_3100() local 1970 OH_Cursor *cursor; SUB_DDM_RDB_4100() local 2021 OH_Cursor *cursor; SUB_DDM_RDB_4200() local [all...] |
H A D | rdb_store_level_test.cpp | 189 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql);
in SUB_DDM_RDB_LEVEL_0100() local 192 cursor->getRowCount(cursor, &rowCount);
in SUB_DDM_RDB_LEVEL_0100() 196 cursor->destroy(cursor);
in SUB_DDM_RDB_LEVEL_0100() 238 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql);
in SUB_DDM_RDB_LEVEL_0200() local 241 cursor->getRowCount(cursor, &rowCount);
in SUB_DDM_RDB_LEVEL_0200() 245 cursor->destroy(cursor);
in SUB_DDM_RDB_LEVEL_0200() 287 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql); SUB_DDM_RDB_LEVEL_0300() local 336 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql); SUB_DDM_RDB_LEVEL_0400() local 385 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql); SUB_DDM_RDB_LEVEL_EL_0100() local 433 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql); SUB_DDM_RDB_LEVEL_EL_0200() local 482 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql); SUB_DDM_RDB_LEVEL_EL_0300() local 531 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(storeLevelTestRdbStore_, querySql); SUB_DDM_RDB_LEVEL_EL_0400() local [all...] |
/interface/sdk_c/build-tools/capi_parser/src/coreImpl/parser/ |
H A D | parse_include.py | 35 def find_parent(cursor): # 获取父节点 36 cursor_parent = cursor.semantic_parent 61 def processing_no_child(cursor, data): # 处理没有子节点的节点 62 if cursor.kind == CursorKind.INTEGER_LITERAL: # 整型字面量类型节点,没有子节点 63 tokens = cursor.get_tokens() 68 def get_token(cursor): 70 for token in cursor.get_tokens(): 76 def judgment_extern(cursor, data): # 判断是否带有extern 77 tokens = get_token(cursor) 78 if cursor [all...] |
/interface/sdk_c/distributeddatamgr/relational_store/include/ |
H A D | oh_cursor.h | 104 * @param cursor Represents a pointer to an {@link OH_Cursor} instance. 110 int (*getColumnCount)(OH_Cursor *cursor, int *count); 115 * @param cursor Represents a pointer to an {@link OH_Cursor} instance. 122 int (*getColumnType)(OH_Cursor *cursor, int32_t columnIndex, OH_ColumnType *columnType); 127 * @param cursor Represents a pointer to an {@link OH_Cursor} instance. 135 int (*getColumnIndex)(OH_Cursor *cursor, const char *name, int *columnIndex); 140 * @param cursor Represents a pointer to an {@link OH_Cursor} instance. 149 int (*getColumnName)(OH_Cursor *cursor, int32_t columnIndex, char *name, int length); 154 * @param cursor Represents a pointer to an {@link OH_Cursor} instance. 161 int (*getRowCount)(OH_Cursor *cursor, in [all...] |
/test/xts/acts/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/entry/src/ohosTest/js/test/ |
H A D | RelationalStoreCloudCursor.test.js | 105 * @tc.desc query with cursor, and get all columns.
130 console.log(TAG + `testRdbQueryWithCursor0001 query cursor fail, errcode:${JSON.stringify(err)}.`);
140 * @tc.desc query with cursor, and specific columns.
162 let cursor = resultSet.getLong(resultSet.getColumnIndex(relationalStore.Field.CURSOR_FIELD));
163 expect(12).assertEqual(cursor);
168 console.log(TAG + `testRdbQueryWithCursor0002 query cursor fail, errcode:${JSON.stringify(err)}.`);
178 * @tc.desc update data, and query with cursor.
215 console.log(TAG + `testRdbQueryWithCursor0003 query cursor fail, errcode:${JSON.stringify(err)}.`);
225 * @tc.desc delete data, and query with cursor.
252 console.log(TAG + `testRdbQueryWithCursor0004 query cursor fai [all...] |
/test/xts/acts/distributeddatamgr/relationalStoretest/relationalStoreNdktest/entry/src/main/cpp/ |
H A D | rdb_test.cpp | 597 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore, predicates, columnNames, len); in QueryOne() local 601 napi_create_int32(env, cursor != nullptr, &result); in QueryOne() 622 OH_Cursor *cursor = OH_Rdb_Query(nullptr, predicates, columnNames, len); in QueryTwo() local 626 napi_create_int32(env, cursor == nullptr, &result); in QueryTwo() 647 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore, nullptr, columnNames, len); in QueryThree() local 651 napi_create_int32(env, cursor == nullptr, &result); in QueryThree() 666 OH_Cursor *cursor = OH_Rdb_Query(predicatesTestRdbStore, predicates, nullptr, len); in QueryFour() local 670 napi_create_int32(env, cursor != nullptr, &result); in QueryFour() 733 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(predicatesTestRdbStore, querySql); in ExecuteQueryOne() local 737 napi_create_int32(env, cursor ! in ExecuteQueryOne() 747 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(nullptr, querySql); ExecuteQueryTwo() local 760 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(predicatesTestRdbStore, nullptr); ExecuteQueryThree() local 773 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(predicatesTestRdbStore, 0); ExecuteQueryFour() local 1064 OH_Cursor *cursor = OH_Rdb_QueryLockedRow(predicatesTestRdbStore, predicates, NULL, 0); QueryLockRowOne() local [all...] |
/test/xts/acts/distributeddatamgr/relationalStoretest/relationalStoreNdktestHvigor/entry/src/main/cpp/ |
H A D | napi_init.cpp | 246 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(store, querySql);
in OH_Rdb_SetDbType_SQLITE_0200() local 247 NAPI_ASSERT(env, cursor != nullptr, "OH_Rdb_ExecuteQuery is fail.");
in OH_Rdb_SetDbType_SQLITE_0200() 250 cursor->getRowCount(cursor, &rowCount);
in OH_Rdb_SetDbType_SQLITE_0200() 252 cursor->destroy(cursor);
in OH_Rdb_SetDbType_SQLITE_0200() 304 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(store, querySql);
in OH_Rdb_SetDbType_SQLITE_0300() local 305 NAPI_ASSERT(env, cursor != nullptr, "OH_Rdb_ExecuteQuery is fail.");
in OH_Rdb_SetDbType_SQLITE_0300() 307 cursor->getRowCount(cursor, in OH_Rdb_SetDbType_SQLITE_0300() 352 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(store, querySql); OH_Rdb_SetDbType_SQLITE_Id_0100() local 400 OH_Cursor *cursor = OH_Rdb_ExecuteQuery(store, querySql); OH_Rdb_SetDbType_SQLITE_Id_0200() local [all...] |
/test/xts/device_attest_lite/services/core/include/network/ |
H A D | attest_tls.h | 29 int32_t LoadCommonOtherCert(mbedtls_x509_crt* chain, uint32_t cursor);
|
/test/xts/device_attest_lite/services/core/network/ |
H A D | attest_tls.c | 266 int32_t LoadCommonOtherCert(mbedtls_x509_crt* chain, uint32_t cursor) in LoadCommonOtherCert() argument 268 if (chain == NULL || cursor >= ATTEST_ARRAY_SIZE(g_commonOtherCert)) { in LoadCommonOtherCert() 272 int32_t ret = mbedtls_x509_crt_parse_der(chain, g_commonOtherCert[cursor].certDer, in LoadCommonOtherCert() 273 g_commonOtherCert[cursor].certLen); in LoadCommonOtherCert()
|
/interface/sdk-js/build-tools/dts_parser/package/ |
H A D | JS_API_OPTIMIZE_PLUGIN.js | 1 /*! version:1.0.0 */(()=>{var __webpack_modules__={93062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;const n=r(12781),i=r(49947);class a extends n.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new i.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,t,r){let n=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,((e,t)=>e?(n=!0,r(e)):(t&&t.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),n=!0,r())))}catch(e){if(n)throw e;r(e)}}_flush(e){this.rowFormatter.finish(((t,r)=>t?e(t):(r&&r.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),e())))}}t.CsvFormatterStream=a},26763:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0;t.FormatterOptions=class{constructor(e={}){var t;this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='"':!1===(null==e?void 0:e.quote)&&(this.quote=""),"string"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},92607:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;const i=n(r(48094)),a=n(r(59722)),o=n(r(91658));t.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const t=`[${e.delimiter}${o.default(e.rowDelimiter)}|\r|\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=`${a.default(e)?"":e}`.replace(/\0/g,""),{formatterOptions:i}=this;if(""!==i.quote){if(-1!==n.indexOf(i.quote))return this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote))}return-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},17181:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;const i=n(r(98423)),a=n(r(72307)),o=r(92607),s=r(24692);class c{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new o.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&(Array.isArray(e[0])&&2===e[0].length)}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return c.isRowHashArray(e)?e.map((e=>e[0])):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return s.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=c.createTransform(e)}format(e,t){this.callTransformer(e,((r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)}))}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=c.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?c.isRowHashArray(e)?this.headers.map(((t,r)=>{const n=e[r];return n?n[1]:""})):c.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map(((t,r)=>e[r])):this.headers.map((t=>e[t]))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map(((e,r)=>this.fieldFormatter.format(e,r,t))).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(""):r}}t.RowFormatter=c},49947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var n=r(17181);Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=r(92607);Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},47201:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;const s=r(73837),c=r(12781),l=a(r(57147)),u=r(26763),d=r(93062);o(r(24692),t);var p=r(93062);Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return p.CsvFormatterStream}});var f=r(26763);Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return f.FormatterOptions}}),t.format=e=>new d.CsvFormatterStream(new u.FormatterOptions(e)),t.write=(e,r)=>{const n=t.format(r),i=s.promisify(((e,t)=>{n.write(e,void 0,t)}));return e.reduce(((e,t)=>e.then((()=>i(t)))),Promise.resolve()).then((()=>n.end())).catch((e=>{n.emit("error",e)})),n},t.writeToStream=(e,r,n)=>t.write(r,n).pipe(e),t.writeToBuffer=(e,r={})=>{const n=[],i=new c.Writable({write(e,t,r){n.push(e),r()}});return new Promise(((a,o)=>{i.on("error",o).on("finish",(()=>a(Buffer.concat(n)))),t.write(e,r).pipe(i)}))},t.writeToString=(e,r)=>t.writeToBuffer(e,r).then((e=>e.toString())),t.writeToPath=(e,r,n)=>{const i=l.createWriteStream(e,{encoding:"utf8"});return t.write(r,n).pipe(i)}},24692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=e=>1===e.length},47410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;const n=r(71576),i=r(12781),a=r(23962),o=r(5147);class s extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new o.Parser(e),this.headerTransformer=new a.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new a.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e,...t){return"end"===e?(this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1):super.emit(e,...t)}_transform(e,t,r){if(this.hasHitRowLimit)return r();const n=s.wrapDoneCallback(r);try{const{lines:t}=this,r=t+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(e){return n(e)}}_flush(e){const t=s.wrapDoneCallback(e);if(this.hasHitRowLimit)return t();try{const e=this.lines+this.decoder.end(),r=this.parse(e,!1);return this.processRows(r,t)}catch(e){return t(e)}}parse(e,t){if(!e)return[];const{line:r,rows:n}=this.parser.parse(e,t);return this.lines=r,n}processRows(e,t){const r=e.length,n=i=>{const a=e=>e?t(e):i%100!=0?n(i+1):void setImmediate((()=>n(i+1)));if(this.checkAndEmitHeaders(),i>=r||this.hasHitRowLimit)return t();if(this.parsedLineCount+=1,this.shouldSkipLine)return a();const o=e[i];this.rowCount+=1,this.parsedRowCount+=1;const s=this.rowCount;return this.transformRow(o,((e,t)=>{if(e)return this.rowCount-=1,a(e);if(!t)return a(new Error("expected transform result"));if(t.isValid){if(t.row)return this.pushRow(t.row,a)}else this.emit("data-invalid",t.row,s,t.reason);return a()}))};n(0)}transformRow(e,t){try{this.headerTransformer.transform(e,((r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(new Error("Expected result from header transform"))))}catch(e){t(e)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}static wrapDoneCallback(e){let t=!1;return(r,...n)=>{if(r){if(t)throw r;return t=!0,void e(r)}e(...n)}}}t.CsvParserStream=s},49042:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserOptions=void 0;const i=n(r(91658)),a=n(r(59722));t.ParserOptions=class{constructor(e){var t;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},85455:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;const s=a(r(57147)),c=r(12781),l=r(49042),u=r(47410);o(r(53154),t);var d=r(47410);Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return d.CsvParserStream}});var p=r(49042);Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return p.ParserOptions}}),t.parse=e=>new u.CsvParserStream(new l.ParserOptions(e)),t.parseStream=(e,t)=>e.pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseFile=(e,t={})=>s.createReadStream(e).pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseString=(e,t)=>{const r=new c.Readable;return r.push(e),r.push(null),r.pipe(new u.CsvParserStream(new l.ParserOptions(t)))}},46366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const n=r(90203),i=r(40478),a=r(98661);class o{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:o.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(a.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(r)||t.push(r),!0)}}t.Parser=o},40478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;const n=r(83525),i=r(98661);t.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return""===e.join("").replace(/\s+/g,"")}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,a=[];let o=this.getStartToken(n,a);for(;o;){if(i.Token.isTokenRowDelimiter(o))return n.advancePastToken(o),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(o,t)&&r?null:(n.truncateToCursor(),a);if(!this.shouldSkipColumnParse(n,o,a)){const e=this.columnParser.parse(n);if(null===e)return null;a.push(e)}o=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),a)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const a=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==a&&i.Token.isTokenRowDelimiter(a))return r.push(""),!0;if(null!==a&&i.Token.isTokenDelimiter(a,n))return r.push(""),!0}return!1}}},90203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;const n=r(98661),i=/((?:\r\n)|\n|\r)/;t.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],a=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:a,endCursor:a+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor [all...] |
H A D | JS_API_CHECK.js | 1 /*! version:1.0.0 */(()=>{var __webpack_modules__={49792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;const n=r(2203),i=r(17693);class a extends n.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new i.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,t,r){let n=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,((e,t)=>e?(n=!0,r(e)):(t&&t.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),n=!0,r())))}catch(e){if(n)throw e;r(e)}}_flush(e){this.rowFormatter.finish(((t,r)=>t?e(t):(r&&r.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),e())))}}t.CsvFormatterStream=a},68502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0;t.FormatterOptions=class{constructor(e={}){var t;this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='"':!1===(null==e?void 0:e.quote)&&(this.quote=""),"string"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},68091:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;const i=n(r(87914)),a=n(r(74733)),o=n(r(10912));t.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const t=`[${e.delimiter}${o.default(e.rowDelimiter)}|\r|\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=`${a.default(e)?"":e}`.replace(/\0/g,""),{formatterOptions:i}=this;if(""!==i.quote){if(-1!==n.indexOf(i.quote))return this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote))}return-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},50803:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;const i=n(r(85710)),a=n(r(8142)),o=r(68091),s=r(90565);class c{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new o.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&(Array.isArray(e[0])&&2===e[0].length)}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return c.isRowHashArray(e)?e.map((e=>e[0])):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return s.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=c.createTransform(e)}format(e,t){this.callTransformer(e,((r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)}))}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=c.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?c.isRowHashArray(e)?this.headers.map(((t,r)=>{const n=e[r];return n?n[1]:""})):c.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map(((t,r)=>e[r])):this.headers.map((t=>e[t]))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map(((e,r)=>this.fieldFormatter.format(e,r,t))).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(""):r}}t.RowFormatter=c},17693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var n=r(50803);Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=r(68091);Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},1696:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;const s=r(39023),c=r(2203),l=a(r(79896)),u=r(68502),d=r(49792);o(r(90565),t);var p=r(49792);Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return p.CsvFormatterStream}});var f=r(68502);Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return f.FormatterOptions}}),t.format=e=>new d.CsvFormatterStream(new u.FormatterOptions(e)),t.write=(e,r)=>{const n=t.format(r),i=s.promisify(((e,t)=>{n.write(e,void 0,t)}));return e.reduce(((e,t)=>e.then((()=>i(t)))),Promise.resolve()).then((()=>n.end())).catch((e=>{n.emit("error",e)})),n},t.writeToStream=(e,r,n)=>t.write(r,n).pipe(e),t.writeToBuffer=(e,r={})=>{const n=[],i=new c.Writable({write(e,t,r){n.push(e),r()}});return new Promise(((a,o)=>{i.on("error",o).on("finish",(()=>a(Buffer.concat(n)))),t.write(e,r).pipe(i)}))},t.writeToString=(e,r)=>t.writeToBuffer(e,r).then((e=>e.toString())),t.writeToPath=(e,r,n)=>{const i=l.createWriteStream(e,{encoding:"utf8"});return t.write(r,n).pipe(i)}},90565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=e=>1===e.length},68273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;const n=r(13193),i=r(2203),a=r(55698),o=r(65856);class s extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new o.Parser(e),this.headerTransformer=new a.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new a.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e,...t){return"end"===e?(this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1):super.emit(e,...t)}_transform(e,t,r){if(this.hasHitRowLimit)return r();const n=s.wrapDoneCallback(r);try{const{lines:t}=this,r=t+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(e){return n(e)}}_flush(e){const t=s.wrapDoneCallback(e);if(this.hasHitRowLimit)return t();try{const e=this.lines+this.decoder.end(),r=this.parse(e,!1);return this.processRows(r,t)}catch(e){return t(e)}}parse(e,t){if(!e)return[];const{line:r,rows:n}=this.parser.parse(e,t);return this.lines=r,n}processRows(e,t){const r=e.length,n=i=>{const a=e=>e?t(e):i%100!=0?n(i+1):void setImmediate((()=>n(i+1)));if(this.checkAndEmitHeaders(),i>=r||this.hasHitRowLimit)return t();if(this.parsedLineCount+=1,this.shouldSkipLine)return a();const o=e[i];this.rowCount+=1,this.parsedRowCount+=1;const s=this.rowCount;return this.transformRow(o,((e,t)=>{if(e)return this.rowCount-=1,a(e);if(!t)return a(new Error("expected transform result"));if(t.isValid){if(t.row)return this.pushRow(t.row,a)}else this.emit("data-invalid",t.row,s,t.reason);return a()}))};n(0)}transformRow(e,t){try{this.headerTransformer.transform(e,((r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(new Error("Expected result from header transform"))))}catch(e){t(e)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}static wrapDoneCallback(e){let t=!1;return(r,...n)=>{if(r){if(t)throw r;return t=!0,void e(r)}e(...n)}}}t.CsvParserStream=s},96793:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserOptions=void 0;const i=n(r(10912)),a=n(r(74733));t.ParserOptions=class{constructor(e){var t;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},77190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;const s=a(r(79896)),c=r(2203),l=r(96793),u=r(68273);o(r(50331),t);var d=r(68273);Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return d.CsvParserStream}});var p=r(96793);Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return p.ParserOptions}}),t.parse=e=>new u.CsvParserStream(new l.ParserOptions(e)),t.parseStream=(e,t)=>e.pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseFile=(e,t={})=>s.createReadStream(e).pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseString=(e,t)=>{const r=new c.Readable;return r.push(e),r.push(null),r.pipe(new u.CsvParserStream(new l.ParserOptions(t)))}},1381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const n=r(77366),i=r(57291),a=r(7757);class o{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:o.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(a.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(r)||t.push(r),!0)}}t.Parser=o},57291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;const n=r(95779),i=r(7757);t.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return""===e.join("").replace(/\s+/g,"")}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,a=[];let o=this.getStartToken(n,a);for(;o;){if(i.Token.isTokenRowDelimiter(o))return n.advancePastToken(o),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(o,t)&&r?null:(n.truncateToCursor(),a);if(!this.shouldSkipColumnParse(n,o,a)){const e=this.columnParser.parse(n);if(null===e)return null;a.push(e)}o=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),a)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const a=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==a&&i.Token.isTokenRowDelimiter(a))return r.push(""),!0;if(null!==a&&i.Token.isTokenDelimiter(a,n))return r.push(""),!0}return!1}}},77366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;const n=r(7757),i=/((?:\r\n)|\n|\r)/;t.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],a=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:a,endCursor:a+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor [all...] |
/interface/sdk-js/build-tools/dts_parser/build_package/ |
H A D | JS_API_COUNT.js | 1 /*! version:1.0.0 */(()=>{var __webpack_modules__={49792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;const n=r(2203),i=r(17693);class a extends n.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new i.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,t,r){let n=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,((e,t)=>e?(n=!0,r(e)):(t&&t.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),n=!0,r())))}catch(e){if(n)throw e;r(e)}}_flush(e){this.rowFormatter.finish(((t,r)=>t?e(t):(r&&r.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),e())))}}t.CsvFormatterStream=a},68502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0;t.FormatterOptions=class{constructor(e={}){var t;this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='"':!1===(null==e?void 0:e.quote)&&(this.quote=""),"string"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},68091:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;const i=n(r(87914)),a=n(r(74733)),o=n(r(10912));t.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const t=`[${e.delimiter}${o.default(e.rowDelimiter)}|\r|\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=`${a.default(e)?"":e}`.replace(/\0/g,""),{formatterOptions:i}=this;if(""!==i.quote){if(-1!==n.indexOf(i.quote))return this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote))}return-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},50803:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;const i=n(r(85710)),a=n(r(8142)),o=r(68091),s=r(90565);class c{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new o.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&(Array.isArray(e[0])&&2===e[0].length)}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return c.isRowHashArray(e)?e.map((e=>e[0])):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return s.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=c.createTransform(e)}format(e,t){this.callTransformer(e,((r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)}))}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=c.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?c.isRowHashArray(e)?this.headers.map(((t,r)=>{const n=e[r];return n?n[1]:""})):c.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map(((t,r)=>e[r])):this.headers.map((t=>e[t]))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map(((e,r)=>this.fieldFormatter.format(e,r,t))).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(""):r}}t.RowFormatter=c},17693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var n=r(50803);Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=r(68091);Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},1696:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;const s=r(39023),c=r(2203),l=a(r(79896)),u=r(68502),d=r(49792);o(r(90565),t);var p=r(49792);Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return p.CsvFormatterStream}});var f=r(68502);Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return f.FormatterOptions}}),t.format=e=>new d.CsvFormatterStream(new u.FormatterOptions(e)),t.write=(e,r)=>{const n=t.format(r),i=s.promisify(((e,t)=>{n.write(e,void 0,t)}));return e.reduce(((e,t)=>e.then((()=>i(t)))),Promise.resolve()).then((()=>n.end())).catch((e=>{n.emit("error",e)})),n},t.writeToStream=(e,r,n)=>t.write(r,n).pipe(e),t.writeToBuffer=(e,r={})=>{const n=[],i=new c.Writable({write(e,t,r){n.push(e),r()}});return new Promise(((a,o)=>{i.on("error",o).on("finish",(()=>a(Buffer.concat(n)))),t.write(e,r).pipe(i)}))},t.writeToString=(e,r)=>t.writeToBuffer(e,r).then((e=>e.toString())),t.writeToPath=(e,r,n)=>{const i=l.createWriteStream(e,{encoding:"utf8"});return t.write(r,n).pipe(i)}},90565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=e=>1===e.length},68273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;const n=r(13193),i=r(2203),a=r(55698),o=r(65856);class s extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new o.Parser(e),this.headerTransformer=new a.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new a.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e,...t){return"end"===e?(this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1):super.emit(e,...t)}_transform(e,t,r){if(this.hasHitRowLimit)return r();const n=s.wrapDoneCallback(r);try{const{lines:t}=this,r=t+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(e){return n(e)}}_flush(e){const t=s.wrapDoneCallback(e);if(this.hasHitRowLimit)return t();try{const e=this.lines+this.decoder.end(),r=this.parse(e,!1);return this.processRows(r,t)}catch(e){return t(e)}}parse(e,t){if(!e)return[];const{line:r,rows:n}=this.parser.parse(e,t);return this.lines=r,n}processRows(e,t){const r=e.length,n=i=>{const a=e=>e?t(e):i%100!=0?n(i+1):void setImmediate((()=>n(i+1)));if(this.checkAndEmitHeaders(),i>=r||this.hasHitRowLimit)return t();if(this.parsedLineCount+=1,this.shouldSkipLine)return a();const o=e[i];this.rowCount+=1,this.parsedRowCount+=1;const s=this.rowCount;return this.transformRow(o,((e,t)=>{if(e)return this.rowCount-=1,a(e);if(!t)return a(new Error("expected transform result"));if(t.isValid){if(t.row)return this.pushRow(t.row,a)}else this.emit("data-invalid",t.row,s,t.reason);return a()}))};n(0)}transformRow(e,t){try{this.headerTransformer.transform(e,((r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(new Error("Expected result from header transform"))))}catch(e){t(e)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}static wrapDoneCallback(e){let t=!1;return(r,...n)=>{if(r){if(t)throw r;return t=!0,void e(r)}e(...n)}}}t.CsvParserStream=s},96793:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserOptions=void 0;const i=n(r(10912)),a=n(r(74733));t.ParserOptions=class{constructor(e){var t;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},77190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;const s=a(r(79896)),c=r(2203),l=r(96793),u=r(68273);o(r(50331),t);var d=r(68273);Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return d.CsvParserStream}});var p=r(96793);Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return p.ParserOptions}}),t.parse=e=>new u.CsvParserStream(new l.ParserOptions(e)),t.parseStream=(e,t)=>e.pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseFile=(e,t={})=>s.createReadStream(e).pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseString=(e,t)=>{const r=new c.Readable;return r.push(e),r.push(null),r.pipe(new u.CsvParserStream(new l.ParserOptions(t)))}},1381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const n=r(77366),i=r(57291),a=r(7757);class o{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:o.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(a.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(r)||t.push(r),!0)}}t.Parser=o},57291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;const n=r(95779),i=r(7757);t.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return""===e.join("").replace(/\s+/g,"")}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,a=[];let o=this.getStartToken(n,a);for(;o;){if(i.Token.isTokenRowDelimiter(o))return n.advancePastToken(o),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(o,t)&&r?null:(n.truncateToCursor(),a);if(!this.shouldSkipColumnParse(n,o,a)){const e=this.columnParser.parse(n);if(null===e)return null;a.push(e)}o=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),a)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const a=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==a&&i.Token.isTokenRowDelimiter(a))return r.push(""),!0;if(null!==a&&i.Token.isTokenDelimiter(a,n))return r.push(""),!0}return!1}}},77366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;const n=r(7757),i=/((?:\r\n)|\n|\r)/;t.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],a=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:a,endCursor:a+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor [all...] |