Esempio n. 1
0
        public void CreateTables(SimpleSQLManager dbManager)
        {
            SimpleDataTable      dtConfigRow             = dbManager.QueryGeneric("SELECT COUNT(*) CT FROM sqlite_master where type='table' and name='ConfigRow'");
            List <SimpleDataRow> simpleDataConfigRowRows = dtConfigRow.rows;

            if (int.Parse(simpleDataConfigRowRows[0]["CT"].ToString()) == 0)
            {
                dbManager.CreateTable <ConfigRow>();
                Debug.Log("create table ConfigRow.");
            }
            SimpleDataTable      dtResourceRow             = dbManager.QueryGeneric("SELECT COUNT(*) CT FROM sqlite_master where type='table' and name='ResourceRow'");
            List <SimpleDataRow> simpleDataResourceRowRows = dtResourceRow.rows;

            if (int.Parse(simpleDataResourceRowRows[0]["CT"].ToString()) == 0)
            {
                dbManager.CreateTable <ResourceRow>();
                Debug.Log("create table ResourceRow.");
            }
            SimpleDataTable      dtSessionRow             = dbManager.QueryGeneric("SELECT COUNT(*) CT FROM sqlite_master where type='table' and name='SessionRow'");
            List <SimpleDataRow> simpleDataSessionRowRows = dtSessionRow.rows;

            if (int.Parse(simpleDataSessionRowRows[0]["CT"].ToString()) == 0)
            {
                dbManager.CreateTable <SessionRow>();
                Debug.Log("create table SessionRow.");
            }
        }
Esempio n. 2
0
 /// <summary>创建表格</summary>
 private void createTable()
 {
     m_DbManager.CreateTable <CacheInfo>();
 }