dev.toml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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.state:
  34. # 10 = alive
  35. # -10 = deleted
  36. # log_action.status:
  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 "compact_main" (
  43. # "id" INTEGER NOT NULL,
  44. # "type" INTEGER 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. # "state" INTEGER NOT NULL,
  52. # PRIMARY KEY("id" AUTOINCREMENT)
  53. # );
  54. # CREATE TABLE "log_action" (
  55. # "id" INTEGER NOT NULL,
  56. # "uid" TEXT NOT NULL,
  57. # "commitTime" TEXT NOT NULL,
  58. # "type" TEXT NOT NULL,
  59. # "action" TEXT NOT NULL,
  60. # "operator" TEXT NOT NULL,
  61. # "status" TEXT NOT NULL,
  62. # PRIMARY KEY("id" AUTOINCREMENT)
  63. # );
  64. # INSERT INTO compact_main VALUES(null, 'class', 'CL1', 'dscrp', 'n.HE', datetime('now'), 'KB1, KB2', '', 'alive');
  65. # SELECT name FROM compact_main WHERE belongBoard like '%KB1%'
  66. # SELECT name, dscrp FROM compact_main WHERE dscrp like '%KB1%'
  67. # SELECT name, dscrp FROM compact_main WHERE dscrp like '%_%KB1%'
  68. # INSERT INTO compact_main VALUES(null, 'class', 'CL2', '_usingBoard:KB1, KB2', 'n.HE', datetime('now'), '', '', 'alive');
  69. # UPDATE main SET relatedBoard='KB1, KB2' WHERE type='class' AND name='CL2'
  70. # SELECT name FROM main WHERE type='class' AND relatedBoard like '%KB2%'
  71. # delete class 3 combo:
  72. # UPDATE compact_main SET relatedBoard = replace(relatedBoard, 'KB2, ', '') WHERE type='class' AND relatedBoard like '%KB2, %';
  73. # UPDATE compact_main SET relatedBoard = replace(relatedBoard, ', KB2', '') WHERE type='class' AND relatedBoard like '%, KB2%';
  74. # UPDATE compact_main SET relatedBoard = replace(relatedBoard, 'KB2', '') WHERE type='class' AND relatedBoard like '%KB2%';
  75. # Explanation of abbreviations