1 24 25 package org.objectweb.cjdbc.scenario.tools.util; 26 27 import java.io.BufferedWriter ; 28 import java.io.File ; 29 import java.io.FileWriter ; 30 31 37 public class GenerateDatabase 38 { 39 40 static final int START_INDEX = 3500; 41 static final int NUMBER_OF_TABLES = 3000; 42 43 public static void main(String [] args) throws Exception 44 { 45 File f = new File ("database-generated-2.template"); 46 System.out.println(f.getAbsolutePath()); 47 BufferedWriter writer = new BufferedWriter (new FileWriter (f)); 48 49 int finalIndex = START_INDEX + NUMBER_OF_TABLES; 50 for (int i = START_INDEX; i < finalIndex; i++) 51 { 52 writer.write("CREATE TABLE BLOB" + i + " (id INTEGER,blob VARCHAR)"); 53 writer.write(System.getProperty("line.separator")); 54 writer.write("INSERT INTO BLOB" + i + " VALUES(0,'Laura')"); 55 writer.write(System.getProperty("line.separator")); 56 } 57 writer.close(); 58 } 59 } | Popular Tags |