Re: [sqlalchemy] Making a new type out of Postgres DATERANGE + Psycopg2 DateRange

2015-04-24 Thread Mike Bayer
On 4/24/15 9:09 AM, Dimitris Theodorou wrote: Hi, I am using psycopg2 and trying to put together a new daterange type that combines the following: 1. A custom daterange class which provides various useful helpers (backwards/forwards iteration, intersection). 2. The psycopg2 DateRange that

Re: [sqlalchemy] Making a new type out of Postgres DATERANGE + Psycopg2 DateRange

2015-04-24 Thread Dimitris Theodorou
Yes, this project is probably worth it. However at the moment I am looking to use my already implemented daterange logic instead of exploring a new library and having to refactor my codebase for it Getting closer with this, adaptation is failing: class MyDateRange_(DATERANGE, DateRange): pass

Re: [sqlalchemy] Making a new type out of Postgres DATERANGE + Psycopg2 DateRange

2015-04-24 Thread Richard Gerd Kuesters
perhaps this could help you? http://sqlalchemy-utils.readthedocs.org/en/latest/range_data_types.html#datetimerangetype richard. On 04/24/2015 10:09 AM, Dimitris Theodorou wrote: Hi, I am using psycopg2 and trying to put together a new daterange type that combines the following: 1. A cust

[sqlalchemy] Making a new type out of Postgres DATERANGE + Psycopg2 DateRange

2015-04-24 Thread Dimitris Theodorou
Hi, I am using psycopg2 and trying to put together a new daterange type that combines the following: 1. A custom daterange class which provides various useful helpers (backwards/forwards iteration, intersection). 2. The psycopg2 DateRange that fills in with some helpers of its own (contains, c