Initial import of LogDarioSeq baseline

Establishes version control for the personal Logseq DB fork before
starting the server-client architecture migration and domain features
described in docs/agent-guide and the approved implementation plan.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-25 15:32:15 +02:00
commit 40631362b3
2016 changed files with 543898 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
(ns logseq.db-sync.batch-test
(:require [cljs.test :refer [deftest is testing]]
[logseq.db-sync.batch :as batch]))
(deftest rows->insert-batches-test
(testing "splits rows into batches based on max params"
(let [rows [[1 "a" nil]
[2 "b" nil]
[3 "c" nil]]
batches (batch/rows->insert-batches "kvs_import" rows {:max-params 6})]
(is (= 2 (count batches)))
(is (= [1 "a" nil 2 "b" nil] (:args (first batches))))
(is (= [3 "c" nil] (:args (second batches))))
(is (string? (:sql (first batches))))
(is (string? (:sql (second batches))))))
(testing "empty rows returns no batches"
(is (= [] (batch/rows->insert-batches "kvs_import" [] {:max-params 6})))))