Skip to main content

sqlalchemy models for ltree.

Project description

SQLAlchemy Ltree Model Mixins

Synopsis

import ltree
from sqlalchemy import (
  Column,
  Integer,
  Text,
)
from sqlalchemy.orm import (
    Session,
)

class UnorderedNode(Base, ltree.LtreeMixin):
    __tablename__ = 'ltree_nodes'
    id = Column(Integer, primary_key=True)
    name = Column(Text, nullable=False)

class OrderedNode(Base, ltree.OLtreeMixin):
    __tablename__ = 'oltree_nodes'
    id = Column(Integer, primary_key=True)
    name = Column(Text, nullable=False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ltree_models-0.0.11.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

ltree_models-0.0.11-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page