MCPcopy Index your code
hub / github.com/AccelerationNet/access2csv / exportAll

Method exportAll

src/access2csv/Driver.java:66–88  ·  view source on GitHub ↗
(String filename)

Source from the content-addressed store, hash-verified

64 }
65
66 static void exportAll(String filename) throws IOException{
67 Database db = DatabaseBuilder.open(new File(filename));
68 try{
69 for(String tableName : db.getTableNames()){
70 String csvName = tableName + ".csv";
71 Writer csv = new FileWriter(csvName);
72 try{
73 System.out.println(String.format("Exporting '%s' to %s/%s",
74 tableName, System.getProperty("user.dir"), csvName));
75 int rows = export(db, tableName, csv);
76 System.out.println(String.format("%d rows exported", rows));
77 }finally{
78 try{
79 csv.flush();
80 csv.close();
81 }catch(IOException ex){}
82 }
83 }
84 }finally{
85 db.close();
86 }
87
88 }
89
90 static void printUsage(){
91 System.out.println("Usage:");

Callers 1

mainMethod · 0.95

Calls 1

exportMethod · 0.95

Tested by

no test coverage detected