Skip to content

Instantly share code, notes, and snippets.

@corneliouzbett
Created May 1, 2019 09:12
Show Gist options
  • Save corneliouzbett/1191510efc9a31f66dede5352369eb5c to your computer and use it in GitHub Desktop.
Save corneliouzbett/1191510efc9a31f66dede5352369eb5c to your computer and use it in GitHub Desktop.
private void enlistCreateTable(String sql, DDLType ddlType)
throws SQLException {
String tn = ddlType.getDBObjectName(sql);
UcanaccessConnection ac = UcanaccessConnection.getCtxConnection();
String execId = UcanaccessConnection.getCtxExcId();
Connection hsqlConn = ac.getHSQLDBConnection();
Database db = ac.getDbIO();
LoadJet lfa = new LoadJet(hsqlConn, db);
lfa.synchronisationTriggers(tn, true,true);
CreateTableCommand c4io;
if(ddlType.equals(DDLType.CREATE_TABLE)){
parseTypesFromCreateStatement(sql);
c4io=new CreateTableCommand(
tn, execId, this.types,this.defaults,this.notNulls);
}
else {
c4io=new CreateTableCommand(tn, execId);
}
ac.add(c4io);
}
@corneliouzbett
Copy link
Author

Good one !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment