Skip to content

Conversation

@AxiosLeo
Copy link
Owner

@AxiosLeo AxiosLeo commented Dec 7, 2025

Note

Significantly expands unit tests across modules, adding coverage for SQL building/management, client creation/connection logic, core query execution, hooks, operators, query utilities, and transaction workflows with validations and error paths.

  • Tests:
    • Builder/ManageSQLBuilder:
      • Add cases for FORCE INDEX (strings/arrays/PRIMARY) on SELECT/UPDATE.
      • Validate update/delete preconditions and error messages.
      • Subquery attrs, joins with subqueries, JSON conditions, IN/BETWEEN/CONTAIN, incrBy.
      • ManageSQL: column rendering (types, defaults, UNSIGNED, onUpdate, AFTER), create/drop index/foreign keys, references with actions, unique indexes.
    • Client:
      • Add createClient/createPromiseClient behaviors (reuse/recreate by state, named clients), input validation.
      • getClient retrieval/errors; MySQLClient types (conn/pool), execQuery, close/error handling.
      • Pool reuse/recreate logic.
    • Core:
      • _query for default/custom drivers, transaction vs non-transaction paths, queryHandler validation, error propagation.
      • _execSQL preferring query then execute, with success/error paths.
    • Hooks:
      • register/trigger, wildcard paths, special keys handling, listen integration.
    • Operator/Query:
      • find first-row behavior; error propagation including err.sql.
      • Method coverage: explain, buildSql (deprecated), inserts/updates/deletes, upsertRow, notExec.
      • QueryHandler: query, tables, deprecated upsert, existence checks, table fields.
      • Query/QueryCondition: joins (left/right/inner), having, grouping, whereConditions/groupWhere, force, keys, pagination, validations (limit/offset/join type), rich where helpers (IN/BETWEEN/LIKE/overlaps, JSON).
    • Transactions:
      • TransactionOperator suffix append; custom driver validation.
      • TransactionHandler isolation levels (full/abbr), begin/commit/rollback guards, execute/query, lastInsertId, upsert paths.

Written by Cursor Bugbot for commit 33a2caf. This will update automatically on new commits. Configure here.

@AxiosLeo AxiosLeo merged commit 70e57f2 into main Dec 7, 2025
7 checks passed
@AxiosLeo AxiosLeo deleted the chore/test-cov branch December 7, 2025 02:43
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