dev.toml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # ----- App Configuration -----
  2. StrictMode = true
  3. DBType = "sqlite3"
  4. DBPath = "dev.db"
  5. Lang = "en"
  6. ListStyle = "tree"
  7. DisplayTimeZone = "utc+8"
  8. Start_as_LLM_server = false
  9. # ----- DB Configuration -----
  10. # Just a better reference for dev.db, no functional use(yet)
  11. [compact_main]
  12. c1_pk = "id INTEGER PRIMARY KEY ASC"
  13. c2 = "type"
  14. c3 = "name"
  15. c4 = "dscrp"
  16. c5 = "creator"
  17. c6 = "createdTime"
  18. c7 = "relatedBoard"
  19. c8 = "relatedClass"
  20. c9 = "status"
  21. [log_action]
  22. c1_pk = "id INTEGER PRIMARY KEY ASC"
  23. c2 = "uid" # UNIQUE
  24. c3 = "commitTime"
  25. c4 = "type"
  26. c5 = "commitedAction"
  27. c6 = "operator"
  28. c7 = "state"
  29. # ----- Some Notes -----
  30. # compact_main.status:
  31. # -10 = deleted
  32. # 10 = alive
  33. # log_action.state:
  34. # -10 = committed failed
  35. # 10 = successfully committed
  36. # Set integer prime key: <columnName> INTEGER PRIMARY KEY ASC
  37. # status: alive/deleted/unclassified(event only)
  38. # ↓ Don't foget to write the method(s) for it
  39. # ListStyle: tree/md_table/LLM_md_table/<customName>
  40. # ----- used sqls -----
  41. # CREATE TABLE "main" (
  42. # "id" INTEGER NOT NULL,
  43. # "type" TEXT NOT NULL,
  44. # "name" TEXT NOT NULL,
  45. # "dscrp" TEXT NOT NULL,
  46. # "creator" TEXT NOT NULL,
  47. # "createdTime" TEXT NOT NULL,
  48. # "relatedBoard" TEXT NOT NULL,
  49. # "relatedClass" TEXT NOT NULL,
  50. # "alive" INTEGER NOT NULL,
  51. # PRIMARY KEY("id" AUTOINCREMENT)
  52. # );
  53. # INSERT INTO compact_main VALUES(null, 'class', 'CL1', 'dscrp', 'n.HE', datetime('now'), 'KB1, KB2', '', 'alive');
  54. # SELECT name FROM compact_main WHERE belongBoard like '%KB1%'
  55. # SELECT name, dscrp FROM compact_main WHERE dscrp like '%KB1%'
  56. # SELECT name, dscrp FROM compact_main WHERE dscrp like '%_%KB1%'
  57. # INSERT INTO compact_main VALUES(null, 'class', 'CL2', '_usingBoard:KB1, KB2', 'n.HE', datetime('now'), '', '', 'alive');
  58. # UPDATE main SET relatedBoard='KB1, KB2' WHERE type='class' AND name='CL2'
  59. # SELECT name FROM main WHERE type='class' AND relatedBoard like '%KB2%'
  60. # delete class 3 combo:
  61. # UPDATE compact_main SET relatedBoard = replace(relatedBoard, 'KB2, ', '') WHERE type='class' AND relatedBoard like '%KB2, %';
  62. # UPDATE compact_main SET relatedBoard = replace(relatedBoard, ', KB2', '') WHERE type='class' AND relatedBoard like '%, KB2%';
  63. # UPDATE compact_main SET relatedBoard = replace(relatedBoard, 'KB2', '') WHERE type='class' AND relatedBoard like '%KB2%';
  64. # Explanation of abbreviations