import { CLICommand } from "./CLICommand"; import { FeedConfig } from "../../config"; import { DatabaseConnection } from "../database/DatabaseConnection"; /** * Imports one of the feeds */ export declare class ImportFeedCommand implements CLICommand { private readonly db; private readonly files; private readonly tmpFolder; constructor(db: DatabaseConnection, files: FeedConfig, tmpFolder: string); private get fileArray(); /** * Do the import and then shut down the connection pool */ run(argv: string[]): Promise; /** * Extract the zip, set up the schema and do the inserts */ doImport(filePath: string): Promise; /** * Drop and recreate the tables */ private setupSchema; /** * Create the last_file table (if it doesn't already exist) */ private createLastProcessedSchema; /** * Set the last schedule ID in the CFA record */ private setLastScheduleId; private removeOrphanStopTimes; private updateLastFile; /** * Process the records inside the given file */ private processFile; private getFeedFile; private schemas; private tables; /** * Close the underling database connection */ end(): Promise; }