Line 23... |
Line 23... |
23 |
import org.openconcerto.sql.model.SQLField;
|
23 |
import org.openconcerto.sql.model.SQLField;
|
24 |
import org.openconcerto.sql.model.SQLRowValues;
|
24 |
import org.openconcerto.sql.model.SQLRowValues;
|
25 |
import org.openconcerto.sql.model.SQLRowValuesListFetcher;
|
25 |
import org.openconcerto.sql.model.SQLRowValuesListFetcher;
|
26 |
import org.openconcerto.sql.model.SQLSelect;
|
26 |
import org.openconcerto.sql.model.SQLSelect;
|
27 |
import org.openconcerto.sql.model.SQLSelect.ArchiveMode;
|
27 |
import org.openconcerto.sql.model.SQLSelect.ArchiveMode;
|
- |
|
28 |
import org.openconcerto.sql.model.SQLSystem;
|
28 |
import org.openconcerto.sql.model.SQLTable;
|
29 |
import org.openconcerto.sql.model.SQLTable;
|
29 |
import org.openconcerto.sql.model.Where;
|
30 |
import org.openconcerto.sql.model.Where;
|
30 |
import org.openconcerto.sql.model.graph.Path;
|
31 |
import org.openconcerto.sql.model.graph.Path;
|
31 |
import org.openconcerto.sql.model.graph.Step;
|
32 |
import org.openconcerto.sql.model.graph.Step;
|
32 |
import org.openconcerto.sql.utils.SQLUtils;
|
33 |
import org.openconcerto.sql.utils.SQLUtils;
|
33 |
import org.openconcerto.sql.utils.SQLUtils.SQLFactory;
|
34 |
import org.openconcerto.sql.utils.SQLUtils.SQLFactory;
|
34 |
import org.openconcerto.utils.cc.ITransformer;
|
35 |
import org.openconcerto.utils.cc.ITransformer;
|
35 |
|
36 |
|
36 |
import java.sql.SQLException;
|
37 |
import java.sql.SQLException;
|
- |
|
38 |
import java.util.EnumSet;
|
37 |
import java.util.List;
|
39 |
import java.util.List;
|
38 |
|
40 |
|
39 |
/**
|
41 |
/**
|
40 |
* Find the private foreign fields for the passed tables and copy the shared private rows. Eg if
|
42 |
* Find the private foreign fields for the passed tables and copy the shared private rows. Eg if
|
41 |
* CPI1 -> OBS1{DES='pb'} and CPI2 -> OBS1{DES='pb'} this clones OBS1 : CPI1 -> OBS1{DES='pb'} and
|
43 |
* CPI1 -> OBS1{DES='pb'} and CPI2 -> OBS1{DES='pb'} this clones OBS1 : CPI1 -> OBS1{DES='pb'} and
|
Line 68... |
Line 70... |
68 |
public final SQLElementDirectory getDir() {
|
70 |
public final SQLElementDirectory getDir() {
|
69 |
return this.dir;
|
71 |
return this.dir;
|
70 |
}
|
72 |
}
|
71 |
|
73 |
|
72 |
@Override
|
74 |
@Override
|
- |
|
75 |
protected EnumSet<SQLSystem> getCompatibleSystems() {
|
- |
|
76 |
// When executing deleteReq :
|
- |
|
77 |
// - if PRIVATE_REFS is temporary : "Can't reopen table"
|
- |
|
78 |
// - if not : "You can't specify target table 'PRIVATE_REFS' for update in FROM clause"
|
- |
|
79 |
return EnumSet.complementOf(EnumSet.of(SQLSystem.MYSQL));
|
- |
|
80 |
}
|
- |
|
81 |
|
- |
|
82 |
@Override
|
73 |
protected void changeImpl(final SQLTable t) throws SQLException {
|
83 |
protected void changeImpl(final SQLTable t) throws SQLException {
|
74 |
getStream().print(t);
|
84 |
getStream().print(t);
|
75 |
final SQLElement elem = this.getDir().getElement(t);
|
85 |
final SQLElement elem = this.getDir().getElement(t);
|
76 |
if (elem == null) {
|
86 |
if (elem == null) {
|
77 |
getStream().println(" : no element");
|
87 |
getStream().println(" : no element");
|