1
2
3
4
5
6
7 package org.asyrinx.joey.gen.command.rdb;
8
9 import org.asyrinx.joey.gen.model.rdb.Column;
10 import org.asyrinx.joey.gen.model.rdb.Index;
11 import org.asyrinx.joey.gen.model.rdb.IndexEntry;
12 import org.asyrinx.joey.gen.model.rdb.Table;
13
14 /***
15 * @author takeshi
16 */
17 public class PrepareColumnIndex extends RdbCommand {
18
19 public void visit(Column column) {
20 if (!column.isIndexed())
21 return;
22 final Table table = column.getParent();
23 final Index index = new Index(table);
24 new IndexEntry(index, column.getName());
25 this.log(index, "create INDEX from " + column.getFullName());
26 }
27
28 }