#Getting errors with Bot Pool

1 messages · Page 1 of 1 (latest)

full gull
#

I create a class (DB) and then have a singleton for the engine

#

or in this case, pool

stray lion
#

I do this as well.
I have a DB class and a function called connect that creates the pool.

Than I have a function that creates a connection with acquire()

So I import my database instance into a file I need it and it would look something like this.

# Import the instance defined with `database = Database()`
from utils.database import database

connection = database.acquire()
connection.execute("SELECT ...")

IF this makes sense close the thead with /close if you want more help ping me with your question :)

full gull
#

exacute