Skip to content

Feature/dbwritemodule#95

Open
Ruairi-wq2 wants to merge 5 commits into
mainfrom
feature/dbwritemodule
Open

Feature/dbwritemodule#95
Ruairi-wq2 wants to merge 5 commits into
mainfrom
feature/dbwritemodule

Conversation

@Ruairi-wq2

Copy link
Copy Markdown

DBwrite module code, including test.csv suite. Init.q and dbwrite.q code to define logic and export it. dbwrite.md as a README.

@Ruairi-wq2

Copy link
Copy Markdown
Author
q)k4unit:use`di.k4unit
q)k4unit.moduletest[`di.dbwrite]
2026.06.03T09:37:00.789 start
2026.06.03T09:37:00.789 :/home/ruairi_conlon/TorQ/di/kdbx-modules/di/dbwrite/test.csv 60 test(s)
2026.06.03T09:37:00.803 end
Test results:
....
true   0  0     q    `AAPL`IBM~exec sym from get `:dbwrite_def_tp/                                          1      :/home/ruairi_conlon/TorQ/di/kdbx-modules/di/dbwrite/test.csv 0   0       1  1    1       1     2026.06.03T09:37:00.803
true   0  0     q    4=logcount                                                                             1      :/home/ruairi_conlon/TorQ/di/kdbx-modules/di/dbwrite/test.csv 0   0       1  1    1       1     2026.06.03T09:37:00.803
All tests passed

Ruairi-wq2 and others added 3 commits June 3, 2026 14:09
…ull guard

- Export savedownmanipulation so consumers can register per-table pre-write functions
- loadconfig warns and loads defaultparams when called with a null file rather than silently failing
- sort falls back to defaultparams directly; removes defaultfile indirection from init.q
- Tests: add savedownmanipulation registered function and error recovery cases, loadconfig null case, move all on-disk cleanup to after blocks
- Docs updated throughout to match

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nput crash

- loadconfig: explicit symbol type check with clear error before null check
- applyattr: guard against invalid att (must be in `p`s`g`u), null colname guard
- sort: type check for d (must be symbol or list); empty list returns () safely
- test.csv: 78 tests covering wrong types, nulls, empty inputs across all functions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng test setup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread di/dbwrite/dbwrite.q
.z.m.loginfo[`dbwrite;"garbage collection returned ",(string `long$r%1048576),"MB. ",.z.M.memstats[]]
};

init:{[config;deps]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config argument not actually called within this function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants