wwwjfy on pyup-update-pytest-4.1.0-to-4.2.0
wwwjfy on master
Update pytest from 4.1.0 to 4.2… (compare)
fantix on pyup-update-pytest-4.1.0-to-4.2.0
Update pytest from 4.1.0 to 4.2… (compare)
fantix on pyup-update-pytest-4.1.0-to-4.2.0
wwwjfy on pyup-update-quart-0.6.10-to-0.7.0
wwwjfy on pyup-update-flake8-3.5.0-to-3.7.1
wwwjfy on master
Update flake8 from 3.5.0 to 3.7… use latest flake8 in tests, ref… Merge pull request #430 from fa… (compare)
wwwjfy on pyup-update-flake8-3.5.0-to-3.7.1
use latest flake8 in tests, ref… (compare)
Gino engine is not initialized
error
set_bind()
it fails because it is async
async.run(db.set_bind(DB_URL)))
it fails elsewhere with a 'cannot perform operation: another operation is in progress'
Hi! I have some problem, I want to join Model with select query, example:
company_query = Order.select(Order.company_id).limit(10)
# then join this query with Order model, something like this:
query = company_query.outerjoin(Order, Order.company == ???).select()
orders = await query.gino.load(Order.load()).all()
How can I do that?
over
in gino: https://stackoverflow.com/a/50876069. Any tips? What do I use instead of session.query in this particular case?
db = Gino(app, dsn=config_database)
, but the IDE can not find declaration such as above image. Anyone can help me, please?
Hi everyone, I'm trying to connect to an existing database without redefining ORM models in Gino. Is this possible?
I'm looking for something similar to what I've been doing in sqlalchemy:
Base = automap_base()
engine = create_engine(connection_string)
# reflect the tables
Base.prepare(engine, reflect=True)
db_session = Session(engine)
User = Base.classes.myapp_user
users = db_session.query(User).all()
class TestModel(Model):
field_a = db.Column(db.Time(), nullable=False)
field_b = db.Column(db.Time(), nullable=False)
_field_c = db.Column(db.String(), nullable=True)
@property
def field_c(self):
return self._field_c
@field_c.setter
def field_c(self, field_c):
print(field_c)
self._field_c = field_c
field_c
async with db.with_bind(alt_dbdriver)
and it connects to the 2nd database fine, however it loses connection to the first database.