public void create(
FemDataServer server,
GeneratedDdlStmt stmt)
{
SqlBuilder sb = createSqlBuilder();
createHeader(sb, "SERVER", stmt);
name(sb, null, server.getName());
stmt.addStmt(sb.getSqlAndClear());
// "TYPE" clause is optional
final String type = server.getType();
if ((type != null) && !type.equals("UNKNOWN")) {
sb.append(" TYPE ");
sb.literal(type);
}
// "VERSION" clause is optional
final String version = server.getVersion();
if ((version != null) && !version.equals("UNKNOWN")) {
sb.append(" VERSION ");
sb.literal(version);
}
sb.append(NL);
sb.append("FOREIGN DATA WRAPPER ");
name(sb, null, server.getWrapper().getName());
addOptions(
sb,
server.getStorageOptions());
addDescription(sb, server);
stmt.addStmt(sb.getSqlAndClear());
}