Commit Graph

12 Commits

Author SHA1 Message Date
SantiagoRR2004
9e270bebe4
Fix #11744; Importing mysql2 and pg when it is not required (#11747)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2026-03-17 15:04:07 -07:00
Guangcong Luo
e18740c70a Fix MySQL support in db library
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
(Broken in a341d3c566)
2025-09-03 22:08:11 -07:00
Guangcong Luo
f770b255f3 Database: Revert syntax for multiline queries
As explicitly documented in `CONTRIBUTING.md`, we are against multiline
template strings. While I see the advantages in readability for the
multiline approach, I'd rather not send extraneous whitespace to the
database.
2025-08-05 22:11:43 -07:00
Mia
4a8341586a Database: Fix PG syntax error in update, remove unnecessary set method
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-08-05 16:38:28 -05:00
Mia
932350d503 Database: Remove more invalid limit statements
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-08-04 22:35:49 -05:00
Mia
a341d3c566 Database: Remove LIMIT clauses from primary key mutating methods
PG doesn't support LIMIT in these, and they don't need it anyway since primary keys should be unique.
2025-08-04 22:16:35 -05:00
Guangcong Luo
31a4289cc6
Refactor Teams plugin to use lib/database (#11109)
* Refactor Teams.save

Fixes a bug where passwords were changed every time a team was updated.

* Refactor Teams to use lib/database

* Add unit tests

(This found a bug which has also been fixed)

* Test more things

---------

Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
2025-08-04 21:51:42 -05:00
Guangcong Luo
4079fe7846 Database library: Support raw strings in SQL()
This is nearly never the right thing to do, but I guess some people
want raw power.
2025-04-12 17:13:47 -07:00
Guangcong Luo
78439b4a02
Update to ESLint 9 (#10926)
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.

- First, we no longer have separate eslint-no-types configs. Lint
  performance shouldn't be enough of a problem to justify the
  relevant maintenance complexity.

- Second, our base config should work out-of-the-box now. `npx eslint`
  will work as expected, without any CLI flags. You should still use
  `npm run lint` which adds the `--cached` flag for performance.

- Third, whatever updates I did fixed style linting, which apparently
  has been bugged for quite some time, considering all the obvious
  mixed-tabs-and-spaces issues I found in the upgrade.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed. We now
  consistently use template strings for this.
2025-02-25 20:03:46 -08:00
Mia
bdc1ed2401 Chatlog: Add support for linecounts on the database 2024-05-18 03:14:57 -05:00
Guangcong Luo
9cd64cba15 Freeze cached Sim objects
We're hunting ~~wabbits~~ validator bugs.

Honestly, this has been a long time coming, but Object.freeze perf
used to not be good enough for us to use it here. Here's hoping!
2023-12-07 01:26:51 -05:00
Guangcong Luo
6b42b4f6b2 Experimental direct replay uploading
We have a new replay server on a new engine using a new schema.

Everything's gone remarkably well, considering.
2023-12-02 11:07:08 -05:00