sqlx requirement for sql manager
zikes opened this issue · 3 comments
zikes commented
In the documentation (https://github.com/ory/ladon#persistence) the SQL example shows a database connection created using stdlib's sql.Open
, however the ladon/manager/sql
NewSQLManager
function lists the first argument as db *sqlx.DB
. As a result, when a standard *sql.DB
is passed in, this error is given:
cannot use ladonDb (type *"database/sql".DB) as type *sqlx.DB in argument to "github.com/ory/ladon/manager/sql".NewSQLManager
wirepair commented
I realize this is closed, but I ran into the same thing, so I wrote my own SQLManager https://github.com/wirepair/ladonsqlmanager that removes the migration/sqlx dependencies. It requires you to manage the tables externally (which is what i want to do anyways).
aeneasr commented
Nice, if you want, you can add it to the readme at the bottom under a new section "3rd Party Libraries" :)
wirepair commented
Done :>