Skip to content

Port TrustDB from SQLite to PostgreSQL #2634

Closed as not planned
Closed as not planned
@0xbbjoker

Description

@0xbbjoker

Is your feature request related to a problem? Please describe.

The current trust score database system primarily supports SQLite, and there is a need to extend it to support PostgreSQL-specific extensions without breaking existing functionality. The challenge is to ensure seamless integration while maintaining backward compatibility, handling potential async issues, and meeting performance expectations.

Describe the solution you'd like

The solution involves introducing PostgreSQL extensions through modular updates to the existing system. Key updates include:

Adding necessary dependencies in package.json.

Implementing trustscoreDb.getInstance() to dynamically initialize the appropriate database adapter. (Design consideration could be changed if showing issues)

Ensuring both PostgreSQL and SQLite functionalities coexist with proper fallbacks.

Describe alternatives you've considered

Considering the design approach as extenstion of database and arhitecture of using it should be easily added without breaking any existing structure 

Additional context

Upcoming development tasks include:

Testing

Address async function concerns.

Ensure PostgreSQL features work as expected.

Validate SQLite backward compatibility.

Measure and optimize performance.

Documentation

Provide detailed setup instructions.

Offer configuration options.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions