package cc.smtweb.framework.core.db.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: AKhh
 * Date: 12-12-21 下午10:13
 * To change this template use File | Settings | File Templates.
 */
public interface IDatabaseInfo {
    void printDatabaseInfo();

    Map<String, TableCheckInfo> getTables();

    Map<String, List<ColumnCheckInfo>> getColumnInfo(Map<String, TableCheckInfo> dbTables);

    Map<String, Map<String, Set<String>>> getIndexInfo(Collection<TableCheckInfo> tableNames, boolean include_nounique);

    class TableCheckInfo {
        public String tableName;
        public String catalog;
        public String pk;
    }

    class ColumnCheckInfo {
        public String tableName;
        public String columnName;
        public String typeName;
        public int columnSize;
        public int decimalDigits;
        public String isNullable; // Y|N or "" = ie nobody knows
    }
}