Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 31 16:42
    fantix commented #428
  • Jan 31 14:11
    wwwjfy labeled #432
  • Jan 31 14:11
    wwwjfy commented #432
  • Jan 31 14:10

    wwwjfy on pyup-update-pytest-4.1.0-to-4.2.0

    (compare)

  • Jan 31 14:10

    wwwjfy on master

    Update pytest from 4.1.0 to 4.2… (compare)

  • Jan 31 14:10
    wwwjfy closed #431
  • Jan 31 13:05
    diegoyosiura opened #432
  • Jan 31 07:08
    aliyarly starred fantix/gino
  • Jan 31 03:48
    coveralls commented #431
  • Jan 31 03:41
    pyup-bot opened #431
  • Jan 31 03:41

    fantix on pyup-update-pytest-4.1.0-to-4.2.0

    Update pytest from 4.1.0 to 4.2… (compare)

  • Jan 31 03:41

    fantix on pyup-update-pytest-4.1.0-to-4.2.0

    (compare)

  • Jan 31 01:55
  • Jan 30 13:55

    wwwjfy on pyup-update-quart-0.6.10-to-0.7.0

    (compare)

  • Jan 30 13:06

    wwwjfy on pyup-update-flake8-3.5.0-to-3.7.1

    (compare)

  • Jan 30 13:06

    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)

  • Jan 30 13:06
    wwwjfy closed #430
  • Jan 30 13:03
    coveralls commented #430
  • Jan 30 12:58
    wwwjfy synchronize #430
  • Jan 30 12:58

    wwwjfy on pyup-update-flake8-3.5.0-to-3.7.1

    use latest flake8 in tests, ref… (compare)

Nikita Bobrov
@nbob
I am not sure, but may be to specify model class is important. Found this in docs ‘user = await User.query.where(User.nickname == 'fantix').gino.first()’
Paul Hummer
@rockstar
@nbob That was it. The expression inside of the where needs to be point to a column. Otherwise, it's WHERE true
Nikita Bobrov
@nbob
Great! Good luck.
Fantix King
@fantix
That is correct, thanks for the answer! Read more here.
Paul Hummer
@rockstar
Anyone have thoughts/resources for unit testing code that uses gino?
Fantix King
@fantix
@rockstar with real DB or mocked DB? Usual test tools for asyncio/aiohttp etc would do for real DB I think, for mocked DB I think it is possible to intercept the actual DB call and record the SQL for assertion
Goos Kim
@gooslab
H..
i have a question . how can i use Array type on Gino ?
Nikita Bobrov
@nbob
Use db.ARRAY column type
It is the same as sqlalchemy postgresql ARRAY
@gooslab
Goos Kim
@gooslab
@nbob can i use only " ARRAY(Integer)) "? actually i want use SET type like Mysql -> SET ('RED', 'BLUE', 'YELLO')
and FIND_IN_SET() too
Goos Kim
@gooslab
can i use like that 'db.Column(db.ARRAY(db.String), nullable=True)' ??
Tony Wang
@wwwjfy
@gooslab check https://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.ARRAY and https://www.postgresql.org/docs/11/functions-array.html for the expressions and functions. It won't be exactly like MySQL, but has similar functions. I haven't tried, but I believe you can get what you want.
Goos Kim
@gooslab
@wwwjfy big thanks !!
Paul Hummer
@rockstar
@fantix to add sqlite support to gino, it looks like I need to implement a sqlite equivalent of gino.dialects.asyncpg - is that right?
Fantix King
@fantix
yes I think so
@rockstar What was the motivation to add SQLite pls? I'm just curious about the reason or use case
Paul Hummer
@rockstar
@fantix rather than trying to mock I/O, we would like to run our tests against an in-memory sqlite database, where we can add test data. Our production is postgres, but setting up a postgres environment just to run tests is...heavyweight.
Fantix King
@fantix
I see, that makes sense. Pls feel free to let me know if you need any help.
Paul Hummer
@rockstar
Oh, trust me, I'll have all sorts of questions.
Fantix King
@fantix
;) also pls be aware that even though we had this BaseDialect and base everything, this is the first try for an alternative dialect/driver - some abstraction might not be ready for that.
Paul Hummer
@rockstar
Yup, I totally expect that.
jawahar
@jawahar273
Hi Iam new gino i am trying to connect to cloud SQL using the database url i am getting this type of error TooManyConnectionsError: too many connections for role "skaeqsqn"
Fantix King
@fantix
hmm that feels like an issue on the database side
do you have any idea how many connections the cloud database allows?
jawahar
@jawahar273
I think 10 connections
Fantix King
@fantix
ok
you may want to login psql and see current active connections?
jawahar
@jawahar273
What might be the per connection do the problem I am sorry I have very little idea about this
Fantix King
@fantix
if the number of active connections reaches the limit, new connection attempt will raise this error
jawahar
@jawahar273
I don't see any field with related to connection
Fantix King
@fantix
@jawahar273 from pg_stat_activity? Each row is one connection
jawahar
@jawahar273
Tq @fantix
Fantix King
@fantix
np
jawahar
@jawahar273
Pls update the doc for dB url DSN in env variable I have hard time in finding and using db.
Fantix King
@fantix
DSN in env variable?
Could you please share a link for that?
jawahar
@jawahar273
https://python-gino.readthedocs.io/en/latest/sanic.html in this page u have explain like DB_HOST etc. But u did not explicaty mention about ENV variable SANIC_DSN_URL
Yeah I think we are missing the docs for DB_DSN in Sanic extension docs.
jawahar
@jawahar273
Yup
greaber
@greaber
Hi! I'm new to Gino. I was just wondering, Postgres has a feature called "schemas", which is like a namespacing layer inside a database (https://www.postgresql.org/docs/11/ddl-schemas.html). What is the best way to work with them in Gino?
Tony Wang
@wwwjfy
@greaber Could you check if this is what you want? fantix/gino#473
greaber
@greaber
Yeah, this looks interesting, thanks!
Hide
@teamhide

Currently, I used below code for query chaining.

User.query.where(User.email == email).where(User.password == password).where(User.join_type == join_type).gino.first()

I wonder that, is it correct statement? Is there any way to querying only one where() with multiple condition?

Leo Sussan
@leosussan
Yo! Anybody using GINO / asyncpg in the Cloud Run environment to connect to a Cloud SQL instance?
Leo Sussan
@leosussan
Beginnings of a FastAPI / GINO / Postgres project generator: https://github.com/leosussan/fastapi-gino-postgres
Leo Sussan
@leosussan

@teamhide Yeah - you should use the and_ function from the sqlalchemy library.

Would look like:

from sqlalchemy import and_

await User.query.where(User.email == email).where(and_(User.password == password, User.join_type == join_type)).gino.first()