dev.toml 2.7 KB

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