{ "info": { "author": "Michael Mulley", "author_email": "michael@michaelmulley.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "License :: OSI Approved :: BSD License", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Topic :: Database" ], "description": "===============\nDjango dbarray\n===============\n\nDjango model fields that store lists of values, implemented using the PostgreSQL ``ARRAY`` type.\n\nRequirements\n============\n\n* PostgreSQL\n* psycopg2\n* Django >= 1.2\n \nThe ARRAY db type is PostgreSQL specific, so these model fields currently\nwork only on PostgreSQL with psycopg2. A ``FieldError`` will be raised if the\nfield is used with another database.\n\nThis package has been tested with Django versions 1.2 through 1.6, inclusive.\n\nFields\n================\n\nThe field types defined in the ``dbarray`` module are listed in the table below,\nalong with each field's parent class (from ``django.db.models``), and the data\ntype of the postgresql column it will create.\n\nEach field takes the same arguments as its parent class.\n\n=================== =================== ================\nField Type Parent Class Postgresql Type\n------------------- ------------------- ----------------\nIntegerArrayField IntegerField integer[]\nFloatArrayField FloatField double precision[]\nTextArrayField TextField text[]\nCharArrayField CharField character varying[]\nDateArrayField DateField date[]\n=================== =================== ================\n\nCustom Fields\n==============\n\nTo define a new array field for a base field type ``FooField``::\n\n import dbarray\n \n class FooArrayField(dbarray.ArrayFieldBase, FooField):\n __metaclass__ = dbarray.ArrayFieldMetaclass\n \nThis may or may not work depending on a few factors. You might, for example, need\nto override the db_type method to make it put the ``[]`` in the right spot in the column\ntype used in generated SQL.\n\nAnother issue that may arise when performing lookups with array fields \nis that PostgreSQL may get the query parameter as a data type\nthat isn't compatible with the type of the db column (for example text[]\ninstead of varchar[]). Then you will get an error like the following::\n\n DatabaseError: operator does not exist: character varying[] = text[]\n LINE 1: ... FROM \"dbarray_chars\" WHERE \"dbarray_chars\".\"arr\" = ARRAY['A...\n ^\n HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.\n\nYou can rectify this by setting ``cast_lookups = True`` on your\n``ArrayFieldBase`` subclass, which instructs it to add an explicit type cast\nto the SQL query.\n\nLook in the source code for more examples of how to handle issues with new\nArrayField types.\n\n\nVersion History\n===============\n\nVersion 0.2\n--------------------------------\n:Released: October 17, 2013\n\nThe fields raise a FieldError exception if used on a database other than\nPostgreSQL. (This was the original behavior)\n\nVersion 0.1\n--------------------------------\n:Released: October 16, 2013\n\nAdded tests and fixes for lookups and DateArrayField.\n\nVersion 0.0.1\n--------------------------------\n:Released: January 10, 2011\n\nInitial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ecometrica/django-dbarray/", "keywords": "django,model,field,postgres,postgresql,database,array,list", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-dbarray", "package_url": "https://pypi.org/project/django-dbarray/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-dbarray/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/ecometrica/django-dbarray/" }, "release_url": "https://pypi.org/project/django-dbarray/0.2/", "requires_dist": null, "requires_python": null, "summary": "Django ORM field for Postgres array types.", "version": "0.2" }, "last_serial": 2825479, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "33fd8c856f676878e536ba721707a9d3", "sha256": "094e6725df42d0a5ed3aa98cd721e0540ac15540db7f804cd558ec970d20690f" }, "downloads": -1, "filename": "django-dbarray-0.0.1.tar.gz", "has_sig": false, "md5_digest": "33fd8c856f676878e536ba721707a9d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2649, "upload_time": "2013-10-09T15:15:31", "url": "https://files.pythonhosted.org/packages/7b/7e/c4b5db9626bf6fdbf1c994a80b7d6194f7ddc9f460c888ee9c79623550ab/django-dbarray-0.0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "65a5ebaa1b7af9fedb8da894941666f1", "sha256": "7d96a7f6c099c61f5bda0eafaafb74788b5181d9ccd87b18ed8c537305e25121" }, "downloads": -1, "filename": "django-dbarray-0.2.tar.gz", "has_sig": false, "md5_digest": "65a5ebaa1b7af9fedb8da894941666f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5364, "upload_time": "2013-12-18T20:06:26", "url": "https://files.pythonhosted.org/packages/68/32/94631f655284c8c0436aef9a269c28a169bbbef8526e707814d3afb9666a/django-dbarray-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "65a5ebaa1b7af9fedb8da894941666f1", "sha256": "7d96a7f6c099c61f5bda0eafaafb74788b5181d9ccd87b18ed8c537305e25121" }, "downloads": -1, "filename": "django-dbarray-0.2.tar.gz", "has_sig": false, "md5_digest": "65a5ebaa1b7af9fedb8da894941666f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5364, "upload_time": "2013-12-18T20:06:26", "url": "https://files.pythonhosted.org/packages/68/32/94631f655284c8c0436aef9a269c28a169bbbef8526e707814d3afb9666a/django-dbarray-0.2.tar.gz" } ] }