Browse Source

今天(?)就这样吧

nandHyf 1 year ago
parent
commit
96cb375a35
3 changed files with 12 additions and 7 deletions
  1. 1 1
      Controller.py
  2. 10 5
      Stateful.py
  3. 1 1
      dev_config.toml

+ 1 - 1
Controller.py

@@ -57,7 +57,7 @@ class Client():
 
 
     # [todo 4]
-    def GenDB():
+    def GenDB():# Stateful里面还有一个一样的方法
         pass
         # 1. 先检查是否已经存在DB? y/n?
         # 2. 连接性检查(是否要切换到新建的DB)y/n?

+ 10 - 5
Stateful.py

@@ -123,17 +123,22 @@ def BuildObj():
     pass
 
 
-def GenModel():
+def GenModel():# Controller里面还有一个一样的方法
     # model IE?
     # over write?
     # exec
     pass
 
 
-class Command():
-    def __init__(self, dbPath, tableName, columnName, newColumnName) -> None:
+class Cursor():
+    def __init__(self, currentPath, previousPath, dbType, dbPath, tableName, columnName, newColumnName) -> None:
+        self.cp = currentPath
+        self.pp = previousPath
+
+        self.dt = dbType
         self.dp = dbPath
 
+
         self.table = tableName
         self.name = columnName
         self.newName = newColumnName
@@ -154,10 +159,10 @@ class Command():
     def add(self, addObj="board", addType="new"):
         # get values
         v1 = MatchTomlTable(self.table)
-        v2 = v1[1:-1]
+        
 
         # 
-        sqls = "INSERT INTO {table} VALUES({values})".format(table=self.table, values=values)
+        sqls = "INSERT INTO {table} VALUES({values})".format(table=self.table, values=)
         res = Exec_one(self.dp, sqls)
 
 

+ 1 - 1
dev_config.toml

@@ -53,4 +53,4 @@ DisplayTimeZone = "utc+8"
 # status: alive/deleted
 #                                           ↓ Don't foget to write the method(s) for it
 # ListStyle: tree/md_table/LLM_md_table/<customName>
-# SafeMode/StrickMode: 1. Have to be full length commands; 2. err when not exist
+# [todo 4] SafeMode/StrickMode: 1. Have to be full length commands; 2. err when not exist