Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
  • airflow-2.7.0 protected
  • airflow253 protected
  • air251
  • test_docker_op
  • airflow225
  • mptest
  • https-deployment
  • datacat_integration protected
  • datacatalog-integration
  • stable-2.2.2 protected
  • stable-2.2.1 protected
  • stable-2.2.0 protected
  • stable-2.1.4 protected
  • stable-2.1.3 protected
  • stable-2.1.2 protected
  • stable-2.1.1 protected
  • stable-2.1.0 protected
  • stable-2.0.2 protected
  • stable-2.0.1 protected
  • stable-2.0.0 protected
  • stable-1.0.1 protected
  • stable-1.0 protected
  • stable-0.1 protected
24 results

README.md

Blame
  • models_global_services.py NaN GiB
    # coding: utf-8
    """
    class StationmetaGlobalService (Base)
    =====================================
    """
    from sqlalchemy import CheckConstraint, Column, Integer, String, Sequence, ForeignKey
    from sqlalchemy.orm import relationship
    from .models_core import StationmetaCore
    from toardb.base import Base    
    
    STATIONMETA_GLOBAL_SERVICES_ID_SEQ = Sequence('stationmeta_global_services_id_seq')  # define sequence explicitly
    class StationmetaGlobalService(Base):
        """ Table "public.stationmeta_global_services"
    
        +--------------------+------------------------+-----------+----------+---------------------------------------------------------+
        |       Column       |          Type          | Collation | Nullable |                         Default                         |
        +====================+========================+===========+==========+=========================================================+
        | id                 | integer                |           | not null | nextval('stationmeta_global_services_id_seq'::regclass) |
        +--------------------+------------------------+-----------+----------+---------------------------------------------------------+
        | variable_name      | character varying(64)  |           | not null |                                                         |
        +--------------------+------------------------+-----------+----------+---------------------------------------------------------+
        | result_type        | integer                |           | not null |                                                         |
        +--------------------+------------------------+-----------+----------+---------------------------------------------------------+
        | result_nvalues     | integer                |           | not null |                                                         |
        +--------------------+------------------------+-----------+----------+---------------------------------------------------------+
        | service_valid_year | integer                |           |          |                                                         |
        +--------------------+------------------------+-----------+----------+---------------------------------------------------------+
        | service_url        | character varying(200) |           | not null |                                                         |
        +--------------------+------------------------+-----------+----------+---------------------------------------------------------+
        Indexes:
         "stationmeta_global_services_pkey" PRIMARY KEY, btree (id)
         "stationmeta_global_services_service_url_key" UNIQUE CONSTRAINT, btree (service_url)
         "stationmeta_global_services_service_url_c8ee80c5_like" btree (service_url varchar_pattern_ops)
        Check constraints:
         "stationmeta_global_services_result_nvalues_check" CHECK (result_nvalues >= 0)
         "stationmeta_global_services_result_type_check" CHECK (result_type >= 0)
         "stationmeta_global_services_service_valid_year_check" CHECK (service_valid_year >= 0)
        Foreign-key constraints:
         "stationmeta_global_services_result_type_fk_rt_voc_enum_val" FOREIGN KEY (result_type) REFERENCES rt_vocabulary(enum_val)
         "stationmeta_global_services_station_id_fkey" FOREIGN KEY (station_id) REFERENCES stationmeta_core(id)
        """
    
        __tablename__ = 'stationmeta_global_services'
        __table_args__ = (
            CheckConstraint('result_nvalues >= 0'),
            CheckConstraint('result_type >= 0'),
            CheckConstraint('service_valid_year >= 0')
        )
    
        id = Column(Integer, STATIONMETA_GLOBAL_SERVICES_ID_SEQ, primary_key=True, server_default=STATIONMETA_GLOBAL_SERVICES_ID_SEQ.next_value())
        variable_name = Column(String(64), nullable=False)
        result_type = Column(ForeignKey('rt_vocabulary.enum_val'), nullable=False)
        result_nvalues = Column(Integer, nullable=False)
        service_valid_year = Column(Integer)
        service_url = Column(String(200), nullable=False, unique=True)
        station_id = Column(ForeignKey(StationmetaCore.id))
    
        station = relationship('StationmetaCore', back_populates='globalservice')
    #   rt_vocabulary = relationship('RtVocabulary')