Re: Adding a database-agnostic JSONField into Django

2019-02-19 Thread Adam Johnson
Dan we don't need a user-operated flag, instead we would introspect the database version in use and have a database backend feature. For example here's where the MySQL backend determines if the "over" clause is supported for window functions:

Re: Will Django ever CompositePrimaryKeys?

2019-02-19 Thread Josh Smeaton
To add - there's definitely appetite for this feature, but it's a difficult one, and no one has stepped up to do it. There are DEP drafts that cover pieces: https://github.com/django/deps/blob/master/draft/0191-composite-fields.rst

Re: Add an defer=True option for model fields

2019-02-19 Thread Dan Davis
What I mean by the below: > I was not sure whether to tell him to implement a ModelManager with a get_queryset() method that defers the field, Of course this works, but I'm not going to maintain this code, and that sort of sophistication creates a need for more sophisticated maintenance. On

Re: Adding a database-agnostic JSONField into Django

2019-02-19 Thread Dan Davis
I'm for this. My only advice is that only some versions of Oracle have a native JSON type. The oracle backend should probably use some query to determine whether the Oracle instance supports JSON field, or there could be a flag in OPTIONS about tihs. On Tuesday, February 19, 2019 at 7:44:40

Add an defer=True option for model fields

2019-02-19 Thread Dan Davis
I have a developer who stores the binary copy of a file in his table. In ColdFusion, this was acceptable, because he was writing every query by hand, and could simply exclude that field. However, with the Django ORM it is a bit of a problem. The primary table he uses is just for the file,

Re: Will Django ever CompositePrimaryKeys?

2019-02-19 Thread Dan Davis
James, As a Django user I've had this problem often. My best practice ways to handle this is as follows: - If the table is read-only, then create a database-level view that manufactures a primary key by concatenating the primary key columns together. Lie to Django and say this

Re: Will Django ever CompositePrimaryKeys?

2019-02-19 Thread James Bennett
On Tue, Feb 19, 2019 at 4:44 AM 'Lance Ellinghaus' via Django developers (Contributions to Django itself) wrote: > Should I consider his statements to be the final statement from the Django > core developers? > > You should take it as someone giving their opinion on the users list. This is the

Re: Adding a database-agnostic JSONField into Django

2019-02-19 Thread nikesh . cse17
Hello , I would like to work on this. I recently started working on django. I want to participate in GSoC so this might work for me. Would you mind helping me. On Thursday, June 23, 2016 at 3:27:07 PM UTC+5:30, Raphael Hertzog wrote: > > Hello, > > in almost all projects I work on, I end up

Will Django ever CompositePrimaryKeys?

2019-02-19 Thread 'Lance Ellinghaus' via Django developers (Contributions to Django itself)
I have a number of legacy databases that I need to access from Django and they do not have a single field primary key. They have composite primary keys. There is no easy way to add the single field primary key because other programs create records and Django would not be the application that