@Override
    public List<DBTableMetaInfo> getMeta() throws SQLException {
        DatabaseMetaData meta = connection.getMetaData();
        List<DBTableMetaInfo> result = new LinkedList<>();

        ResultSet tables = meta.getTables(null, null, "%", (allTables ? null : new String[]{"TABLE"}));
        while (tables.next()) {
            ResultSet columnsSet = meta.getColumns(null, null, tables.getString(3), null);
            List<DBColumnMetaInfo> columns = new LinkedList<>();

            while (columnsSet.next()) {
                columns.add(new DBColumnMetaInfo(columnsSet.getString(4), columnsSet.getString(6)));
            }
            result.add(new DBTableMetaInfo(tables.getString(3), columns));
        }

        return result;
    }