Skip to content

[Feature] Database access #594

Open
Open
@endel

Description

@endel

Context & Description

Databases are such an important piece of any game/application.

Providing a "standard" way to use and consume databases would make it easier to not only re-use and share tiny bits of features between different projects but also provide a building block for database-related features the framework could offer out-of-the-box.

The objective

The objective here is to select a safe module we can build on top of.

Every developer has their favorite SQL builder/ORM (or detests it deeply 😂), and the one selected is (hopefully?) going to be used for years to come.

This new feature will inevitably spark a number of database-related issues and requests that may only be solvable by the original library we are building upon could fix. (There have been some sustainability issues with big ORM projects like Vincit/objection.js#2335, typeorm/typeorm#3267)

Use cases

  • User authentication
  • Persisting room state between sessions
  • "Async games" where other players don't necessarily need to be online
  • Tournament-style games
  • Leaderboards
  • (...more stuff!)

Proposal

Features I would love to have:

  • ORM-like API
  • Be frictionless during development: provide automatic migration when inserting data into the database (could be disabled in production)

So far I'm leaning towards kysely.
I'm curious to hear your thoughts!


(Linked issues: #425, #177)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions