1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        SpiderDB數(shù)據(jù)庫結(jié)構(gòu)扒取工具

        聯(lián)合創(chuàng)作 · 2023-09-30 03:29

        SpiderDB 是一個輕量級的數(shù)據(jù)庫結(jié)構(gòu)扒取工具,使用 Java 開發(fā)。它是一個簡單的類庫可根據(jù)數(shù)據(jù)庫的表結(jié)構(gòu)來生成 POJO 對象,使用簡單,支持各種不同的數(shù)據(jù)庫系統(tǒng)。

        示例代碼:

        DBCrawler dbCrawler = new DBCrawler(connection, ConfigEnum.MAXIMUM);
        DataBase dataBase = dbCrawler.getDatabase();
        System.out.println("productName :" + dataBase.getProductName() + " version:" + dataBase.getProductVersion());

        //Return Schemas
        SchemaSet schemaSet = dataBase.getSchemaSet();
        Set<Schema> schemas = schemaSet.getSchemas();
        //Iterate to Fetch the schema information and Tables
        for(Schema schema : schemas)
        {
           System.out.println("SchemaName :" + schema.getSchamaName());
           TableSet tableSet = schema.getTableSet();
           Set<Table> tables = tableSet.getTables();
           //Iterate to fetch the tables
           for(Table table : tables)
           {
             System.out.println("tableName :" + table.getTableName());
             PrimaryKey primaryKey = table.getPrimaryKey();
             System.out.println("pk_Name:"+primaryKey.getPkName() + " PrimaryKey Columns:" + primaryKey.getColumns());
             
             ColumnSet columnSet = table.getColumnSet();
             System.out.println("Table Columns:"+ columnSet.getColumns());

             Set<ForeignKey> foreignKeys = table.getForeignKeys();
             System.out.println("foreignKeys:"+foreignKeys);
            }
        }

        瀏覽 23
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            亚洲v欧美v另类v综合v日韩v | 亚洲一区二区电影网 | 性综合影院 | 欧老太做爱亚洲性猛交 | 韩国漂亮老师做爰8在线观看 | 美女逼被靠肿网站 | 国产高清无码一区 | 无码日韩一区二区 | 亚洲最大在线视频 | 精品国产一区一区二区三亚瑟 |