MCPcopy Create free account
hub / github.com/Vanderhoof/PyDBML / __init__

Method __init__

pydbml/_classes/table.py:26–52  ·  view source on GitHub ↗
(self,
                 name: str,
                 schema: str = 'public',
                 alias: Optional[str] = None,
                 columns: Optional[Iterable[Column]] = None,
                 indexes: Optional[Iterable[Index]] = None,
                 note: Optional[Union[Note, str]] = None,
                 header_color: Optional[str] = None,
                 comment: Optional[str] = None,
                 abstract: bool = False,
                 properties: Union[Dict[str, str], None] = None
                 )

Source from the content-addressed store, hash-verified

24 dont_compare_fields = ('database',)
25
26 def __init__(self,
27 name: str,
28 schema: str = 'public',
29 alias: Optional[str] = None,
30 columns: Optional[Iterable[Column]] = None,
31 indexes: Optional[Iterable[Index]] = None,
32 note: Optional[Union[Note, str]] = None,
33 header_color: Optional[str] = None,
34 comment: Optional[str] = None,
35 abstract: bool = False,
36 properties: Union[Dict[str, str], None] = None
37 ):
38 self.database: Optional[Database] = None
39 self.name = name
40 self.schema = schema
41 self.columns: List[Column] = []
42 for column in columns or []:
43 self.add_column(column)
44 self.indexes: List[Index] = []
45 for index in indexes or []:
46 self.add_index(index)
47 self.alias = alias if alias else None
48 self.note = Note(note)
49 self.header_color = header_color
50 self.comment = comment
51 self.abstract = abstract
52 self.properties = properties if properties else {}
53
54 @property
55 def note(self):

Callers

nothing calls this directly

Calls 3

add_columnMethod · 0.95
add_indexMethod · 0.95
NoteClass · 0.85

Tested by

no test coverage detected