[sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-12-04 Thread Lele Gaifax
"Mike Bayer" writes: > there should definitely be an "isempty" accessor, but from SQLA's > naming conventions we prefer to have "is_empty" as the official name. > There's a bunch of precedent for this. overall people should be able > to use either one. Great, thank you. -- nickname: Lele Gaifa

Re: [sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-12-04 Thread Mike Bayer
there should definitely be an "isempty" accessor, but from SQLA's naming conventions we prefer to have "is_empty" as the official name. There's a bunch of precedent for this. overall people should be able to use either one. On Sun, Dec 4, 2022, at 12:05 PM, Lele Gaifax wrote: > Federico Cas

[sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-12-04 Thread Lele Gaifax
Federico Caselli writes: > On Thursday, 1 December 2022 at 22:50:11 UTC+1 leleg...@gmail.com wrote: > >> "Mike Bayer" writes: >> > >> > well ".isempty" is not the kind of naming convention we like to use >> > these days, so that should likely be an alias. ".empty" might be >> > named ".is_empty"

[sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-12-01 Thread Federico Caselli
Postgresql does use isempty for the function that test if a range is empty https://www.postgresql.org/docs/current/functions-range.html#RANGE-OPERATORS-TABLE On Thursday, 1 December 2022 at 22:50:11 UTC+1 leleg...@gmail.com wrote: > "Mike Bayer" writes: > > > On Thu, Dec 1, 2022, at 1:01 PM, Le

[sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-12-01 Thread Lele Gaifax
"Mike Bayer" writes: > On Thu, Dec 1, 2022, at 1:01 PM, Lele Gaifax wrote: >> Wrt "empty", what's your preference, leaving it as is and expose a >> "isempty" property or rename the attribute to "isempty" (and possibly) >> add a backward compat "empty" property? > > well ".isempty" is not the kind

Re: [sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-12-01 Thread Mike Bayer
On Thu, Dec 1, 2022, at 1:01 PM, Lele Gaifax wrote: > "Mike Bayer" writes: > > > On Wed, Nov 30, 2022, at 2:31 PM, Lele Gaifax wrote: > >> "Mike Bayer" writes: > >> > >> > On Wed, Nov 30, 2022, at 10:30 AM, Lele Gaifax wrote: > >> >> > >> >> - "empty" vs "isempty": both asyncpg and psycopg h

[sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-12-01 Thread Lele Gaifax
"Mike Bayer" writes: > On Wed, Nov 30, 2022, at 2:31 PM, Lele Gaifax wrote: >> "Mike Bayer" writes: >> >> > On Wed, Nov 30, 2022, at 10:30 AM, Lele Gaifax wrote: >> >> >> >> - "empty" vs "isempty": both asyncpg and psycopg have a "isempty" >> >> property, we could either rename the "empty" a

Re: [sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-11-30 Thread Mike Bayer
On Wed, Nov 30, 2022, at 2:31 PM, Lele Gaifax wrote: > "Mike Bayer" writes: > > > On Wed, Nov 30, 2022, at 10:30 AM, Lele Gaifax wrote: > >> On the former one, it would be nice if we could reduce the "distance" > >> between the new Range class and what popular drivers provide: > >> > >> - "emp

[sqlalchemy] Re: Reflections on the SA 2.0 new PG Range

2022-11-30 Thread Lele Gaifax
"Mike Bayer" writes: > On Wed, Nov 30, 2022, at 10:30 AM, Lele Gaifax wrote: >> On the former one, it would be nice if we could reduce the "distance" >> between the new Range class and what popular drivers provide: >> >> - "empty" vs "isempty": both asyncpg and psycopg have a "isempty" >> prop