Changeset View
Changeset View
Standalone View
Standalone View
scripts/symbols/import_repository_symbols.php
| Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | function commit_symbols( | ||||
| } | } | ||||
| echo pht('Loading %s symbols...', phutil_count($sql)), "\n"; | echo pht('Loading %s symbols...', phutil_count($sql)), "\n"; | ||||
| foreach (array_chunk($sql, 128) as $chunk) { | foreach (array_chunk($sql, 128) as $chunk) { | ||||
| queryfx( | queryfx( | ||||
| $conn_w, | $conn_w, | ||||
| 'INSERT INTO %T | 'INSERT INTO %T | ||||
| (repositoryPHID, symbolContext, symbolName, symbolType, | (repositoryPHID, symbolContext, symbolName, symbolType, | ||||
| symbolLanguage, lineNumber, pathID) VALUES %Q', | symbolLanguage, lineNumber, pathID) VALUES %LQ', | ||||
| $symbol->getTableName(), | $symbol->getTableName(), | ||||
| implode(', ', $chunk)); | $chunk); | ||||
| } | } | ||||
| } | } | ||||
| function check_string_value($value, $field_name, $line_no, $max_length) { | function check_string_value($value, $field_name, $line_no, $max_length) { | ||||
| if (strlen($value) > $max_length) { | if (strlen($value) > $max_length) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| "%s '%s' defined on line #%d is too long, ". | "%s '%s' defined on line #%d is too long, ". | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||