Search in sources :

Example 1 with GetDbCollationTask

use of com.cubrid.cubridmanager.core.cubrid.table.task.GetDbCollationTask in project cubrid-manager by CUBRID.

the class CubridDatabaseLoader method setDbCollation.

private void setDbCollation(CubridDatabase database) {
    DatabaseInfo databaseInfo = database.getDatabaseInfo();
    boolean supportCharset = CompatibleUtil.isSupportCreateDBByCharset(databaseInfo);
    if (!supportCharset || !databaseInfo.getServerInfo().isConnected()) {
        return;
    }
    GetDbCollationTask getDbCollationTask = new GetDbCollationTask(databaseInfo);
    getDbCollationTask.execute();
    if (getDbCollationTask.isSuccess()) {
        databaseInfo.setCollation(getDbCollationTask.getCollation());
    }
}
Also used : DatabaseInfo(com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo) GetDbCollationTask(com.cubrid.cubridmanager.core.cubrid.table.task.GetDbCollationTask)

Aggregations

DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)1 GetDbCollationTask (com.cubrid.cubridmanager.core.cubrid.table.task.GetDbCollationTask)1