• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

georgia-tech-db / eva / #758

04 Sep 2023 08:37PM UTC coverage: 0.0% (-78.3%) from 78.333%
#758

push

circle-ci

hershd23
Increased underline length in at line 75 in text_summarization.rst
	modified:   docs/source/benchmarks/text_summarization.rst

0 of 11303 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/evadb/catalog/models/udf_metadata_catalog.py
1
# coding=utf-8
2
# Copyright 2018-2023 EvaDB
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
#     http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15

16
from sqlalchemy import Column, ForeignKey, Integer, String, UniqueConstraint
×
17
from sqlalchemy.orm import relationship
×
18

19
from evadb.catalog.models.base_model import BaseModel
×
20
from evadb.catalog.models.utils import UdfMetadataCatalogEntry
×
21

22

23
class UdfMetadataCatalog(BaseModel):
×
24
    """
25
    The `UdfMetadataCatalog` catalog stores information about the metadata of user-defined functions (UDFs).
26
    Metadata is implemented a key-value pair that can be used to store additional information about the UDF.
27
    It maintains the following information for each attribute:
28
        `_row_id:` an autogenerated identifier
29
        `_key: ` key/identifier of the metadata (as a string)
30
        `_value:` value of the metadata (as a string)
31
        `_udf_id:` the `_row_id` of the `UdfCatalog` entry to which the attribute belongs
32
    """
33

34
    __tablename__ = "udf_metadata_catalog"
×
35

36
    _key = Column("key", String(100))
×
37
    _value = Column("value", String(100))
×
38
    _udf_id = Column("udf_id", Integer, ForeignKey("udf_catalog._row_id"))
×
39

40
    __table_args__ = (UniqueConstraint("key", "udf_id"), {})
×
41

42
    # Foreign key dependency with the udf catalog
43
    _udf = relationship("UdfCatalog", back_populates="_metadata")
×
44

45
    def __init__(self, key: str, value: str, udf_id: int):
×
46
        self._key = key
×
47
        self._value = value
×
48
        self._udf_id = udf_id
×
49

50
    def as_dataclass(self) -> "UdfMetadataCatalogEntry":
×
51
        return UdfMetadataCatalogEntry(
×
52
            row_id=self._row_id,
53
            key=self._key,
54
            value=self._value,
55
            udf_id=self._udf_id,
56
            udf_name=self._udf._name,
57
        )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc