Commit Graph

16 Commits

Author SHA1 Message Date
seb
4718cb5726 u 2026-10-04 21:22:05 +02:00
seb
9885c489f0 u 2026-09-29 20:10:49 +02:00
seb
69bd0935cc u 2026-09-29 18:26:42 +02:00
seb
0cafa11a32 u 2026-09-27 21:01:30 +02:00
seb
cd57f21af8 u 2026-09-27 16:19:45 +02:00
seb
e7f92ebef8 u 2026-09-26 23:06:05 +02:00
seb
cca131d83a sqlite 2026-09-22 07:25:16 +02:00
seb
53a20c4353 refactor: introduce database provider abstraction, isolate MSSQL layer
- Add provider contract (src/providers/provider.js): query() -> {rows,
  rowsAffected, insertId}, callback transaction(fn), exec() for stored
  procs, initialize/purge lifecycle
- Add MssqlProvider (src/providers/mssql/index.js) wrapping an mssql
  ConnectionPool with normalized results, tx commit/rollback and
  constraint-error classifiers (unique 2627/2601, FK 547)
- LibDashStore constructor now takes a provider instead of a pool
  (breaking); adds LibDashStore.create() async factory; keeps pool as
  transitional bridge until store modules are converted (see TODO.md)
- Move MSSQL-specific code into the provider: src/sql/* ->
  src/providers/mssql/queries/*, src/schema.js ->
  src/providers/mssql/schema.js, purge SQL -> purgeSql.js
- Update scripts, generate-schema-graph.js and package.json exports
  (./providers/mssql, ./providers/provider)
- Add TODO.md with the remaining provider/SQLite migration plan

No SQL or behavioral changes.
2026-09-20 13:51:01 +02:00
seb
af52ff595f feat(articlesupplier): add sort column, reorder method, and update queries and schema 2026-09-17 12:00:41 +02:00
seb
4c196c7209 feat(articlesupplier): implement store methods, schema constraints, and embed in getBySku 2026-09-17 11:41:13 +02:00
seb
aefd97a171 Rewrite store JSDoc, split quote/order into modules, and generate typed API docs
- Rewrite JSDoc across all store methods to document the actual async
  methods (real params, returns, throws) instead of the internal wrappers
- Split quote/order into individual module files backed by shared
  manifestDoc helpers; remove the createStore factory and thin wrappers
- Deduplicate manifest line helpers into src/store/manifestLines.js
- Extend generate-api-doc.js to render parameter/return/throws types and
  emit per-namespace API.<module>.md files with an API.md index
- Regenerate all API docs
2026-08-07 06:23:17 +02:00
seb
4833acd680 docs: add JSDoc headers to all externally exported store functions 2026-08-07 03:58:48 +02:00
seb
14d8a4c978 Merge getBySku into single SQL query with FOR JSON sub-queries
Replaces 6 round-trips (1 sequential resolve + 5 parallel detail)
with one query. Auth resolution, article detail, categories, photos,
eans, and prices are all fetched in a single round-trip.
2026-08-03 08:39:17 +02:00
seb
9be9f7f74c u 2026-08-01 05:10:03 +02:00
seb
6b1701d4dc u 2026-07-31 18:15:15 +02:00
seb
7e1e96d3cd u 2026-07-31 16:17:33 +02:00