Re: Database agnostic EnumField

2017-10-20 Thread Ashley Waite
are > still present with a removed enumeration value? > > On Fri, Oct 20, 2017 at 12:55 PM, Ashley Waite > wrote: > >> I've been working a bit on an EnumField implementation because it'll save >> me a lot of future time in a project, and existing implementatio

Database agnostic EnumField

2017-10-20 Thread Ashley Waite
I've been working a bit on an EnumField implementation because it'll save me a lot of future time in a project, and existing implementations seem to be fragile, non-reversible, or one-database-only. Wondering why there isn't a PEP435 based EnumField in Django itself, I didn't find many answers w

Re: PostgreSQL Partial Indexes package

2017-10-20 Thread Ashley Waite
I did a similar thing (but only tested in postgres) a while back, using Q's / filter clause to generate the where clause. Perhaps with our powers combined we're close to a generalised implementation? https://github.com/ashleywaite/django-more/blob/master/django_more/indexes.py On Saturday, O

Re: Adding generated common table expressions

2017-04-06 Thread Ashley Waite
Looking forwards to seeing a DEP! > > [0] https://docs.djangoproject.com/en/1.11/ref/ > models/expressions/#subquery-expressions > > On 22 March 2017 at 01:32, Ashley Waite wrote: > >> Here's the code changes I've made, noting that some of them were to shove >&g

Re: Adding generated common table expressions

2017-03-21 Thread Ashley Waite
han recursive queries. I'd be > interested in seeing, as part of a DEP, how CTE inclusion in django core > could support the cte-trees project from an API perspective. > > On Friday, 17 March 2017 22:28:17 UTC+11, Ashley Waite wrote: >> >> Hey all, >> >>

Re: Adding generated common table expressions

2017-03-21 Thread Ashley Waite
CTE Forest is a specific use case of CTEs to store self-referential tree data sets. It's quite a different use to what I'm proposing, though its implementation might become simpler if Django is generally CTE aware. - Ashley On Saturday, March 18, 2017 at 6:59:57 PM UTC+11, Matthias Kestenholz

Re: Adding generated common table expressions

2017-03-21 Thread Ashley Waite
> you've already got something that works with an okay API so I'm hopeful. >> >> I'd be very interested in seeing your POC too if you're able to share. >> >> From looking very briefly at django-cte-trees it doesn't aim to support >> user

Adding generated common table expressions

2017-03-17 Thread Ashley Waite
Hey all, I'd like to suggest adding Common Table Expression (CTE) query generation as a feature to Django. I've been working on a project that required manipulation of many records at once, and as with many ORMs found that this wasn't an ideal use-case in Django. As the rest of our code bas