Skip to content

[Databases] Fix query behavior + general cleanup#2198

Open
drkameleon wants to merge 2 commits intomasterfrom
cleanup-database-module
Open

[Databases] Fix query behavior + general cleanup#2198
drkameleon wants to merge 2 commits intomasterfrom
cleanup-database-module

Conversation

@drkameleon
Copy link
Collaborator

@drkameleon drkameleon commented Mar 3, 2026

Description

Right now, our database module suffers from various issues:

  • execManySqliteDb has no ROLLBACK on failure
  • we match select to figure out whether a query will return rows or not - this is totally fragile
  • query pushes nothing on non-SELECT queries
  • .id and the result itself can both be push to the stack ⚠️
  • execManySqliteDb always returns EmptyQueryResult
  • .mysql is obsolete/unused
  • all values returned as strings - integers, floats, and NULLs are all stringified no matter what
  • open doesn't handle errors properly
  • also, the name is extremely common and could - perhaps be re-assigned to sth more suitable (e.g. file/stream access?)
  • close doesn't catch errors properly either

Type of change

  • Code cleanup
  • Unit tests (added or updated unit-tests)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (implementation update, or general performance enhancements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (documentation-related additions)

@drkameleon drkameleon added helpers Issues related to Helper modules cleanup Code cleanup, comments and micro-optimizations :database → Databases labels Mar 3, 2026
@github-actions github-actions bot added 3rd-party Issues related to 3rd-party libraries and code and removed helpers Issues related to Helper modules → Databases labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3rd-party Issues related to 3rd-party libraries and code cleanup Code cleanup, comments and micro-optimizations :database

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant