dev.toml 2.3 KB

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