Skip to main content

django_cubrid

Overview

Django_cubrid is a comprehensive Django database backend for CUBRID, a powerful open-source relational database management system optimized for web applications. This backend integrates seamlessly with Django, offering full support for Django's ORM capabilities and transaction management, while also providing efficient connection handling and compatibility with CUBRID features and data types.

For more information about CUBRID, visit the web site: http://www.cubrid.org

Features

  • Full ORM Support: Leverage Django's ORM system to work with CUBRID databases.
  • Transaction Management: Support for Django's transaction handling to ensure data integrity.
  • Efficient Connection Handling: Manage database connections efficiently for different deployment scenarios.
  • CUBRID-specific Features: Utilize CUBRID's unique features and data types within Django.

Prerequisites

  • Python >= 3.9
  • Django >= 4.2
  • cubrid_db >= 0.7.1

Build instructions

Build:

$ python setup.py build

Install:

$ sudo python setup.py install

Django configuration

Configure the DATABASES part in your Django settings.py module:

    DATABASES = {
        'default': {
            'ENGINE': 'django_cubrid',       # The backend name: django_cubrid
            'NAME': 'demodb',                # CUBRID Database name
            'USER': 'public',                # User to access CUBRID
            'PASSWORD': '',                  # Password to access CUBRID.
            'HOST': '',                      # Set to empty string for localhost.
            'PORT': '33000',                 # Set to empty string for default.
        }
    }

For more information on using and configuring this backend, refer to the Django documentation.

Note:

  • This backend is community-driven and is not officially part of the Django project.
  • Always ensure compatibility between your Django version and this backend.

Known issues

  • ForeignKey to_field feature does not work because CUBRID limitations: CUBRID does not allow foreign key to reference non-primary key;
  • Does not support microsecond precision, CUBRID has millisecond precision;
  • Positive number constraints are not implemented by CUBRID;
  • SQL order by ... exists is not supported by CUBRID;
  • No math power operators are present in CUBRID SQL;
  • Django loaddata command can fail in some cases with recursive relations, because CUBRID does not support disabling constraint checks;
  • CUBRID does not allow duplicate indexes;
  • CUBRID does not allow auto increment on char field;
  • CUBRID does not support removing the primary key;
  • CUBRID does not implement SHA224, SHA256, SHA384, SHA512;
  • CUBRID does not implement ISO year extraction;
  • FTimeDelta does not work - many tests are failing, not yet fixed;
  • Some other various Django tests are failing.

Testing

Start CUBRID service:

$ cubrid service start

Clone Django patched and adapted for django_cubrid testing:

$ git clone git@github.com:zimbrul-co/django.git
$ git checkout cubrid-4.2

Create a new virtual environment for the tests:

$ python -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r tests/requirements/cubrid.txt

Test:

(venv) $ cd tests
(venv) $ python ./runtests.py --settings test_cubrid

License

CUBRID is distributed under two licenses, Database engine is under GPL v2 or later and the APIs are under BSD license.

The django_cubrid is under BSD license. See LICENSE file.

Release files for django-cubrid 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-cubrid 0.5.2
File Size Uploaded
django_cubrid-0.5.2.tar.gz 29.5 kB Details

Release files / django_cubrid-0.5.2.tar.gz

Download URL django_cubrid-0.5.2.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
372cd0b3e6253648a806818bcfb49a8668792cb42b0dfe6140a9a44c0429fd54
BLAKE2b-256 checksum
How to use checksums
2c4b1e1a3ba1a43cf90869acb6c1142d2c714950045118649418b04482073bc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.5.2 This release

1 release file

0.5.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page