MCPcopy Create free account
hub / github.com/CDSecLab/MJXT / write_all_matched

Method write_all_matched

src/test/java/Table_Gen.java:31–49  ·  view source on GitHub ↗

write the records that all match. e.g., attribute-value pair w matching 1000 records which all satisfy the query @param buffWriter write buffer @param th the column number @param type the number of records for each kind @param counter the counter @return the counter @throws IOException

(BufferedWriter buffWriter, int th, int type, int counter)

Source from the content-addressed store, hash-verified

29 * @throws IOException
30 */
31 public static int write_all_matched(BufferedWriter buffWriter, int th, int type, int counter) throws IOException {
32 int share_num = 2;//the number of the identical record
33 for (int i = 0; i < type; i++) {
34 for (int j = 0; j < share_num; j++) {
35 String csv = table_name + "_id_" + counter;
36 for (int k = 0; k < key_colnum; k++) {
37 csv += "," + table_name +"_keyword_" + th + "_" + k;
38 }
39 for (int k = 0; k < join_column; k++) {
40 csv += "," + "join_" + th + "_"+ i + "_" + k;
41 }
42 counter++;
43 buffWriter.write(csv);
44 buffWriter.newLine();
45 buffWriter.flush();
46 }
47 }
48 return counter;
49 }
50
51 /**
52 * write the records that all match. e.g., w matching 1000 records where 100 records satisfy the query.

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected