curveball / a12n-server

An open source lightweight OAuth2 server
Apache License 2.0
453 stars 49 forks source link

Adding a broken attempt at injecting knex with types into a12n #356

Closed mihok closed 2 years ago

mihok commented 2 years ago

Changes

Im attempting to include knex as the database client to enable PostgreSQL in addition to MySQL, and in the future enable all the database clients knex supports.

Currently trying to keep up with types, and providing a minimal attempt at not having to create any breaking changes.

I'm currently fighting with the params parameter for the .query function (which now just pipes directly into knex.raw. Their function signatures match, and in theory the types they use should match as well but I'm still having issues. (reference to all the knex types: https://github.com/knex/knex/blob/master/types/index.d.ts)