package com.zzsn.tongbu.oracldb;

import com.zzsn.tongbu.mysqldb.DBManager;
import com.zzsn.tongbu.mysqldb.DataTable;

import java.sql.SQLException;

public class SyMeth {
    public static void main(String[] args) {

    }


    public void getBaseData(){

    }
    static String searchSql = "SELECT title,summary,keywords,author,content,SOURCESITE,sourceaddress,publish_date,origin from cis_ans_processitem where sid='2022021506' limit 10 ";
    private static void searchData()
    {
        DBManager dm = new DBManager();
        String[] coulmn = null;
        int[] type = null;

        try {
            DataTable dt = dm.getResultData(coulmn, type, searchSql);
            if(dt != null && dt.getRowCount()> 0){
                for(int i = 0; i<dt.getRowCount(); i++)
                {
                    for(int j = 0; j<dt.getColCoun(); j++)
                        System.out.printf(dt.getRow()[i][j]+"\t");
                    System.out.println();
                }
            }
            else
                System.out.println("查询失败");
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
