package UI;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import javax.sql.DataSource;
import org.postgresql.ds.PGSimpleDataSource;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;
import RDG.*;

/**
 *
 * @author Marcel
 */
public class Passengers {
    /**
    * Print all passengers
    * @throws SQLException
    */
    public static void print() throws SQLException, IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Zadaj prvé dve písmená mena");
        String odpoved = input.readLine();
        var res=PassengerFinder.selectWithPrefix(odpoved);
        BatchOutput.BatchPrint(res);
    }
}
