You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've set up a project with Telegrammer and Vapor. I've installed the postgresql driver and registered FluentPostgreSQLProvider, but I'm not sure how to get a database connection in my bot class.
If I have a model called User and I want to query all users, I'd write the following code: User.query(on: conn).all(), where conn is an object that conforms to DatabaseConnectable. I'm not sure where/how I can access this object in my bot class.
The text was updated successfully, but these errors were encountered:
I've set up a project with Telegrammer and Vapor. I've installed the postgresql driver and registered
FluentPostgreSQLProvider
, but I'm not sure how to get a database connection in my bot class.If I have a model called
User
and I want to query all users, I'd write the following code:User.query(on: conn).all()
, whereconn
is an object that conforms toDatabaseConnectable
. I'm not sure where/how I can access this object in my bot class.The text was updated successfully, but these errors were encountered: