dev.toml 2.7 KB

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