Use Result from Select Query will create a connection
Select queries are lazily evaluated in peewee. How else do you think it would work, given that peewee uses method chaining to build a query?

So when you are building your query -- nothing happens until you:

* iterate over it
* call .get() / .first() / .count() etc on it
* explicitly call .execute()

For your example, you could just coerce to a list if you wanted.
Example:

```python
class User(BaseModel): 
    username = CharField(unique=True)  
    class Meta: 
        db_table = 'user' 

    @classmethod 
    def query_user(cls): 
        with DATABASE.connection_context(): 
            query = User.select() 
        return query 
 
q = User.query_user() 
print(DATABASE.is_closed()) 
for i in q: 
    print(i.username) 
print(DATABASE.is_closed())  ##here will be False 
```

