Commit Graph

21 Commits (38406fb39a501c4ff3ba749e90cba06e320c8774)

Author SHA1 Message Date
Gabriel Horner b5a52edae8 fix: db lint 2024-02-14 17:20:27 -05:00
Gabriel Horner 26bc6f0d1d chore: mv logseq.graph-parser.util.db to db dep
This ns is more appropriate in db and was only in graph-parser because
the date-time-util lib wasn't accessible to db until #10933 landed.
graph-parser dep is specific to file graphs and as much as possible
anything unrelated to this should not be in this dep
2024-02-09 16:16:33 -05:00
Gabriel Horner 0768809a86 fix: lints and disable intermittent failing test
- Reverted config/db-based-graph? check in a db only namespace
- Removed unused ns as it appears we just used another fn instead.
- /cc @RCmerci on failing test
2024-01-23 10:48:14 -05:00
Gabriel Horner cdddce0120 fix deps db test and most lints
Also deleted duplicated gp-util.{page-ref,block-ref} files that were moved to common
and moved a related test to common dep
2024-01-11 14:35:04 -05:00
Gabriel Horner ffa6aaae29 fix: remove unused db.sqlite related fns
- remove sqlite-db/close! as its not used and didn't make sense to be
  used in other electron ns
- remove sqlite-db/connections atom as its not needed
- remove read-graph as its not necessary
- rename cli.persist-graph as its primary purpose has changed
- update effected scripts
2023-12-13 12:06:24 -05:00
Gabriel Horner 36a553e4a1 chore merge sqlite-restore into sqlite-db
Also use it on the frontend. Also remove another unnecessary sqlite.db fn
2023-12-12 15:41:02 -05:00
Gabriel Horner e847c0899a enhance: bring back built-in properties using closed values
Fixes LOG-2903. Also fixed a bug with logseq.color property
not working with latest accent color
2023-12-04 17:29:41 -05:00
Gabriel Horner 2554016d63 enhance: make closed values scriptable
Added closed value examples of all 5 property types
to properties graph. Part of LOG-2903
2023-12-04 10:11:52 -05:00
Gabriel Horner 0ffce18d15 chore: rename property.type vars
- renamed schema-type to property-type as its not
  a type of schema and schema is an ambiguous context
  as it also applies to a class
- renamed builtin to built-in to be more correct
2023-11-30 16:26:44 -05:00
Gabriel Horner d218db4e6f fix: fixes bug with unusuable :default property
Part of LOG-2953. Also fixes bug when a new property first displays
configure modal and incorrectly shows cardinality for :default property
2023-11-29 17:15:35 -05:00
Gabriel Horner b359694c4b fix: multiple fixes for property validation
- couldn't use :default block property values
- couldn't add new closed number value
- couldn't select existing :page or :date closed values
- editor/CLI validation wasn't working - see failing db-graph-test job
- update schema for closed-value
Part of LOG-2871. Also fixed typo in ui.cljs
2023-11-15 14:55:57 -05:00
Gabriel Horner edaf9b286a chore: move frontend db namespaces to a dedicated parent ns
Moved these namespaces to logseq.db.frontend.* to make their purpose
explicit and make the namespaces easier to maintain
2023-10-16 17:24:51 -04:00
Gabriel Horner fe7a46eac9 Move db malli schema into db dep since it's stable
Also add a validate-db task. Part of LOG-2739
2023-10-11 08:40:26 -04:00
Gabriel Horner b264d17309 Move db-graph property fns to its own logseq.db ns
db-graph related fns like these shouldn't be in the graph-parser dep as
that dep should only really be used with file graphs as much as possible.
This is also being done in preparation for making the create-graph ns independent of
the frontend

Also db- prefixes in fns were dropped since the ns now carries the db-
prefix
2023-09-05 17:15:45 -04:00
Gabriel Horner 172ee0ae24 Provide sqlite.cli for reusable sqlite fns
Already had to do read-graph 3 times and will soon need to it outside
logseq so worth putting this behind an api ns
2023-08-15 18:08:44 -04:00
Gabriel Horner 0b09b6af56 Fix db lint 2023-07-28 10:46:40 -04:00
Gabriel Horner 2bd7a8d496 Fix querying for multi non-ref vals and single page-ref
Also fixed db lint
2023-07-25 17:27:43 -04:00
Gabriel Horner 9310e9e449 Fix db lints
Split out a common fn from restore-initial-data to make it
more readable
2023-07-17 12:56:01 -04:00
Gabriel Horner 045c51cded Use sqlite.db ns in electron.db
- Add more tests for sqlite.db
- Update readme and CI for db's tests
2023-06-30 17:36:01 -04:00
Gabriel Horner 17d2462343 Move rules into db dep as it's useful for external apps
- rules is already used by logseq-query and will be useful for
  nbb-logseq
- Updated db jobs to run in deps/db by default. Less typing but
  more importantly discourages independent libraries from depending on
  external scripts.
- Moved lint-rules task into db since it is db specific now
- Also remove nbb-logseq from top-level as all nbb compatibility is in
  deps.
2022-06-10 15:39:11 +08:00
Gabriel Horner 6608537909 Move logseq.graph-parser.db* namespaces to their own dep
Also add its own CI file
2022-06-10 15:39:11 +08:00